dynamic jQuery selector not working, when id is concatenated -
the following selector working,
var control = $('select[id^="control0"]')[0]; when use below selector, not working.
var index = 0; var control = $('select[id^="control' + index + '"]')[0]; appreciate help.
your code working me. need see html further.
here's how tested code: `
var index = 0; var control = $('select[id^="control' + index + '"]')[0]; alert($(control).text()) <select id="control0"> <option value="1">1</option> </select> `
Comments
Post a Comment