Sep
20

Get the index of the current element, jquery getEq

JavaScript          Trackback

If you want to grab index of some element you can use this function:

$.fn.getEq = function() { return ($(this).parent().children()).index(this); }

You can call it like this:

$("#someelementid").getEq();


No Comments

Make A Comment

No comments yet.

Comments RSS Feed    TrackBack URL

Leave a comment

top