I'm having a problem with an accordion navigation menu as seen here:
http://www.jalc.org/rr/bands/overview.asp

The problem: Say you click on 2009, the menu loads, and you click on a band
name. It goes to that band page, but, understandably, the accordion snaps
back to its base state. In this case, I want the menu to stay open on 2009,
so that you can easily navigate among the bands in that section...

Not sure how to make this work. Here is the code I am currently using,
courtesy of Marco (http://www.i-marco.nl/weblog/jquery-accordion-menu/): 

function initMenu() {
  $('ul.subnav ul').hide();
  $('ul.subnav ul:first').show();
  $('ul.subnav li').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('ul.subnav ul:visible').slideUp('normal');
        checkElement.slideDown('normal');
        return false;
        }
      }
    );
  }
$(document).ready(function() {initMenu();});


And here is a snippet of my html (showing the classes I'm using):
<li> ../RR/bands/overview.asp  ../RR/images/subnav_bandsoverview.png  </li>
<li> #  ../RR/images/subnav_10.png  </li>
  <ul class="list subsub">
  <li> ../RR/bands/2010/charlie_porter.asp Charlie Porter Quartet </li>
  <li> ../RR/bands/2010/chen_lo.asp Chen Lo and Family Liberation </li>
  <li> ../RR/bands/2010/johnny_rodgers.asp Johnny Rodgers Band </li>
  <li> ../RR/bands/2010/little_joe.asp Little Joe McLerran Quartet </li>
  <li> ../RR/bands/2010/sherman_horner.asp Mark Sherman-Tim Horner </li>
  <li> ../RR/bands/2010/nasar_abadey.asp Nasar Abadey </li>
  <li> ../RR/bands/2010/oscar_williams.asp Oscar Williams </li>
  <li> ../RR/bands/2010/paul_beaudry.asp Paul Beaudry & Pathways </li>
  <li> ../RR/bands/2010/student_loan.asp The Student Loan </li>
  <li> ../RR/bands/2010/turning_pointe.asp Turning Pointe </li>
  </ul>


Please let me know if you have any advice!
Many thanks
Alexandra
-- 
View this message in context: 
http://old.nabble.com/Accordion-Navigation-Menu%3A-help-needed%21-tp26970492s27240p26970492.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to