I have some select element in a page with css style set for them.I use this selector for select all them :
$('.Field3')
and with each loop I want to get selected index of them,but when I change one of them selected item I get selected index set for all.
I create a jsFiddle for it.please change a select element item and click on the button:
does not make much sense. In the function passed to
.each,thisis a jQuery object, not a string. You cannot magically turn a jQuery object into a selector.What you want is
.find, which finds descendants of the element(s) in the jQuery object: http://jsfiddle.net/uLvyS/1/.