Search code examples
jquerygoogle-chromeslideup

jQuery .slideUp() not working in Chrome


I'm trying to make 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?


Solution

  • 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.