Works in Firefox but not IE
- by Abs
Hello all,
I make use of the following to find a string in a particular element, if it exists, tick a checkbox. This works great on Firefox but not internet explorer (8). I am having trouble finding why.
$.fn.searchString = function(str) {
return this.filter('*:contains("' + str + '")');
};
var myID = $('div').searchString(files_array[i].substr(-4));
alert(myID);//[object object]
alert(myID.children());//[object object]
myID.children().attr('checked', true);//does not tick checkbox
alert(myID.children().attr('checked'));//undefined
Does IE not like the children() function?
Thanks all for any help