开发者

jQuery .slideUp() not working in Chrome

I'm trying to mak开发者_C百科e an accordion like section to a page I'm working on. I'm not using jQueries native accordion plugin because I need the ability to close all the sections. My problem is Chrome doesn't seem to be responding to .slideUp() while everything seems to work perfectly in Firefox and IE. Rather than try and copy all the relative code snippets I just uploaded here http://ianburris.com/p/tmp/. Any ideas what might be causing this in Chrome?


You should use a <div> for your containers rather than a <span> here, here's your code (forget the styling, focus on the sliding) as it is, not working with a <span> in chrome.

Here's the working version, the only change is making the element's blocks, <div> elements in this case.

These:

<span id="in-the-classroom" class="menu-pane"> 
//and
<span id="outside-the-classroom" class="menu-pane"> 

Should be:

<div id="in-the-classroom" class="menu-pane"> 
//and
<div id="outside-the-classroom" class="menu-pane">

And of course the matching </span> to </div> changes.


Try changing this:

 if (cfe.active_menu_pane !== null) 

to

 if (cfe.active_menu_pane != null) // Remove the second equal sign

Not sure it would matter but it was the one irregularity I saw in a function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜