Find selected elements index


/ Published in: jQuery
Save to your folder(s)

Never used the index() method in jQuery but could be useful to know. Find a selected elements index when you click on it. Note the $('ul#mylist') inside the index method, gives the search some context of where to look for .selected, saves looking through all the DOM.

URL: http://crad.tumblr.com/post/85523431/jquery-tip-how-to-break-out-of-each

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.