jquery get index by value code example
Example 1: 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");
});
});
Example 2: jquery get element by index
$('ul li').eq(index).css({'background-color':'#343434'});