I have several INPUTs:
<input type="text" name="entry[1]" value="aaa" id="firstEntry" />
<input type="text" name="entry[2]" value="bbb" id="secondEntry" />
<input type="text" name="entry[3]" value="ccc" id="thirdEntry" />
How to get "2" when I know that element id is "secondEntry"?
var name = $("#secondEntry").attr('name'); // name = "entry[2]"
But how to get the index 2 ? I need to know just index (2), not whole name (entry[2]).