This is working fine in firefox but only closes the first page and then breaks in IE8. Firebug in IE8 says that x.item(o) is null. I can’t figure out why this works in firefox but not IE. Thanks for any help.
pager(x=document.getElementsByName("pg1"));
function pager( x ) {
var curr = document.getElementById('showing');
$(curr).fadeOut('fast');
curr.id = 'hide';
$(x).fadeIn('slow');
x.item(0).id ='showing';
}
That’s an assignment. You wanted
==for comparison.(What’s NULL in capital letters? An element’s
idproperty won’t benull; if it’s not set, it’ll be an empty string.)It seems to me you’d be better off using jQuery’s toggle method.