0

Hi I would like to make to my jquery accordeon style menu remember the state after reload or load a page...

I have this code working for products menu but and no idea about how to doing... Any help? Thanks

""<div id="categorias">

   <?php $result2 = mysql_query("SELECT * FROM tbsubcategory WHERE cat_id = '".$row['cat_id']."' ORDER BY tbsubcategory.order ASC"); ?>
   <ul><?php while ($row2 = mysql_fetch_array($result2)): ?><li><a href="<?php echo $GB_RUTA_BASE; ?>/catalogo/ver/<?php echo $row2['subcat_id']; ?>/<?php echo url_amigables($row2['subcat_name_es']); ?>"><?php echo $row2['subcat_name_es']?></a></li>
  <?php endwhile; ?></ul></ul><?php endwhile; ?>""

And this is the javascript code

        $(function(){
            $('#categorias ul ul').hide();
            $('#categorias a').click(function(){
                $(this).next().slideToggle('fast');
                return true;
            });

        });
  • possible duplicate to http://stackoverflow.com/questions/11231436/jquery-ui-accordion-menu-saving-menu-state-even-after-refresh – Brajesh Kumar Sep 05 '13 at 19:44
  • Might want to check out the jQuery plugin for using cookies mentione in this post: http://stackoverflow.com/questions/1458724/how-to-set-unset-cookie-with-jquery – Dylan Holmes Sep 05 '13 at 19:45

0 Answers0