Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery heirarchical menu design
    primarykey
    data
    text
    <p><strong>edit:</strong> ok, the line:</p> <pre><code>$( &lt;?php echo("'#".$_GET['item']."'") ?&gt; ).parent().show(); </code></pre> <p>Is obviously and attempt to keep the menu open at the right place. I don't think this ever worked (got I hate working on other ppls code). </p> <p>Then my current problem is how to access the <code>&lt;ul class="myul"&gt;</code> directly above the <code>&lt;li id="001" &gt;</code> using that item id=001 ??</p> <p>Hi </p> <p>I am trying to fix up a piece of code left to me by a now lost programmer. It works but there is a feature missing; I does not stay opened in the correct place when a menu item is selected.</p> <p>Jquery:</p> <pre><code>$.swapImage(".swapImage"); $( &lt;?php echo("'#".$_GET['item']."'") ?&gt; ).parent().show(); $('.myul').hide(); $('.slide_ul li:not(:first-child)').hide(); $('.hideMe').click(function(){ $(this).next('ul').slideToggle('fast').siblings('ul:visible').slideUp('fast'); }); $('.myul a').click(function(e){ var url = $(this).attr('href'); var index = url.indexOf('='); var substr = url.slice(index+1); $('#productContainer &gt;div').hide(); $('#productContainer').load("products/"+substr+"/product.html", function(){ $(this).fadeIn('slow'); var i = 0; $('.slide_ul li:not(:first-child)').hide(); }); }); </code></pre> <p>HTML:</p> <pre><code> &lt;!-- Right Navigation --&gt; &lt;div id="rightNav"&gt; &lt;div id="navMenu"&gt; &lt;h2 id="navMenuheader"&gt;Catalogue&lt;/h1&gt; &lt;h3 class="hideMe"&gt;Widgets&lt;/h3&gt; &lt;ul class="myul"&gt; &lt;h4 class="hideMe"&gt;Widget Coins&lt;/h2&gt; &lt;ul class="myul"&gt; &lt;li id="001" &gt; &lt;a href="products.php?item=001"&gt;The South African Widget&lt;/a&gt; &lt;/li&gt; </code></pre> <p>The result of the menu click is to injectContent into a black div in the middle of the page. Does <code>$(document).ready(function(){</code> happen everytime this occurs? Otherwise I can't see why all the menu positions are updated. </p> <p>I guess I need some more code to identify the place in the menu we are and leave them open. There are ants on my desk.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload