jQuery("[id^='xxxx']") has a bug?
Hello ,
there are two checkboxs groups on the one page.
the 'cc_8e3287fc-a81d-4761-a64b-62dd037b7fb7_' is prefix of property "id" in the second checkbox items.
and i have checked some items in the first checkbox group,but i didn't checked any items in the second checkbox group,
after i run below code:
---
var isChecked2 = false;
jQuery("input[id^='cc_8e3287fc-a81d-4761-a64b-62dd037b7fb7_']").each(function(ind1,obj1){
if(this.checked){ isChecked2 = true;alert(jQuery(this).attr('id'));return false;}
});
if(!isChecked2 ) {alert("The field 'Other Ministries' is mandatory.");}
else alert('ok');
---
the 'OK' was alerted. and the id of first checkbox items was alerted.
the code :
--
jQuery("input[id^='cc_8e3287fc-a81d-4761-a64b-62dd037b7fb7_']")
--
returns all items in the first checkbox group, it's very strange.
for now ,the prolem is only under IE (my IE version is 8).
and under FF ,there is no problem.
also the jquery version is 1.2.6.
please advise.
Thank you
Daniel