JQuery: Count elements with similar ids

So I got stuck with the problem of counting the text fields with ids like ‘field1’, ‘field2’, ‘field3’ etc. <input id=’field1′ name=’somename_one’/> <input id=’field2′ name=’somename_two’/> <input id=’field3′ name=’somename_three’/>   I need to get the count of such dynamically generated fields. With JQuery, it can be done simply with the following statement: $(“:input[id^=field]”).length This statement will […]

Read more "JQuery: Count elements with similar ids"