How to get elements with the different value of the same attribute in javascript or jquery? -
i need find elements different value of same attribute... works-> $data.find("div[data-alpha='1']"); need this-> $data.find('div[data-alpha='1']' + 'div[data-alpha='2']' .... want find elements have ,,data-alpha" atribute 1 or 2. have idea how that? answers! cheers!
$data.find("div[data-alpha='1'], div[data-alpha='2']") this allows accumulate results of different selectors joining selectors comma single selector.
Comments
Post a Comment