Nicely done, thanks. On Jul 16, 6:19 pm, Dave Methvin <[EMAIL PROTECTED]> wrote: > On Jul 16, 5:23 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > I keep getting an error in the IE browsers (6 & 7). > > > Error: Can't move focus to the control because it is invisible, > > not enabled, or of a type that does not accept the focus. > > > $("#advsect").removeClass("hidden"); // unhide ad > > $("#advsect").animate({height:200},1000); > > $("#advsect").fadeIn(500); // show ad > > $("#advsect").focus(); // put focus back on ad > > I think what is probably happening is that the two queued effects > (animate and fadeIn) haven't started at the point you try to set focus > on the element. If you wanted height and opacity simultaneously then > you should try to do them together in a single animate. Then do > the .focus() in a callback function on the animate. Something like > this: > > $("#advsect") > .removeClass("hidden") > .css({opacity: 0}) > .animate({height:200, opacity:1}, 1000, function(){ > this.focus(); > }); > > > BTW, If I add 'alert("hello world");' anywhere between the { and } of > > the #advtab.mousedown above I don't get a warning. > > That probably gives it time to do the animation before it sets focus.