Skip to content

Instantly share code, notes, and snippets.

@choonkeat
Created January 6, 2009 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save choonkeat/43643 to your computer and use it in GitHub Desktop.
Save choonkeat/43643 to your computer and use it in GitHub Desktop.
loop thru elements, show border, 0-padding, 0-margin to find layout-culprit in IE6
var searchtext = $('.searchtext')[0];
function slow_hunt_for_ie(items, index) {
items = items || $('#ele, #ele *');
index = index || 0;
searchtext.value = index;
var max = index + 5;
for (; index < max && index < items.length; index++) {
$(items[index]).css({
border: '1px #000 solid',
margin: '0px',
padding: '0px'
});
}
if (index < items.length) {
setTimeout(function() {
slow_hunt_for_ie(items, index);
}, 500);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment