jquery get index of current element code example
Example: jquery find index of this
$(document).ready(function() {
$("#example div").click(function() {
var index = $("#example div").index(this);
$("#example_index").html("Index " + index + " was clicked");
});
});