I swear the following code used to work, even in IE7 but now i get
Error: Object doesn't support this property or method
$('div').each(function() {
if(! this.attr('id').startsWith('light') ) {
this.css('zIndex', zIndexNumber);
zIndexNumber -= 10;
}
});
Any ideas?
SOLUTION
$('div').each(function() {
var divId = new String ( $(this).attr('id') );
if(! divId.indexOf('light') == 0 ) {
$(this).css('zIndex', zIndexNumber);
zIndexNumber -= 10;
}
});