Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the jquery opposite of this :not() command

Tags:

jquery

I am trying to get all option values that have no attribute value. So I want it to retrieve options setup like <option value></option> entries.

I have $('#advancedSearchWrap option:not([value=""])') but what I need is the opposite. What is the opposite of this :not() command?

like image 969
KallDrexx Avatar asked May 25 '12 14:05

KallDrexx


People also ask

What is not in jQuery?

The not() is an inbuilt function in jQuery which is just opposite to the filter() method. This function will return all the element which is not matched with the selected element with the particular “id” or “class”. Syntax: $(selector).not(A) The selector is the selected element which is not to be selected.

What is the opposite of append in jQuery?

jQuery prepend() The jQuery prepend() method is used to insert the specified content at the beginning (as a first child) of the selected elements. It is just the opposite of the jQuery append() method.

Whats the opposite of append in JS?

Show activity on this post. The opposite of . append() is . prepend() .


1 Answers

If instead of not you wanted only you could use filter()

like image 140
laurent Avatar answered Sep 27 '22 17:09

laurent