Note that there are some explanatory texts on larger screens.

plurals
  1. POShow one block while hiding other blocks with jquery when clicking on each one in part appears second block, third and then fourth
    primarykey
    data
    text
    <p>I want to make a 4 blocks of navigation menu, while I have one block already shown, then on click open second block, from second you choose and click again appear third block and the same for fourth block... Here is my code, will be glad if will work, but it's not... :( Please help, with suggestions. thanks! The code you can view it below, or here in the next link: <a href="http://jsfiddle.net/9afaF/" rel="nofollow">http://jsfiddle.net/9afaF/</a></p> <pre><code>&lt;div class="games_content"&gt; &lt;script&gt; $(function() { $("#block_2 div,#block_3 div,#block_4 div").hide(); $("#block_1 div").click(function(){ $("#block_2 div,#block_3 div,#block_4 div").hide(); $("#block_2 div."+$(this).attr('id')).show("fast"); $("#block_2 div").click(function(){ $("#block_3 div,#block_4 div").hide(); $("#block_3 div."+$(this).attr('id')).show("fast"); $("#block_3 div").click(function(){ $("#block_4 div").hide(); $("#block_4 div."+$(this).attr('id')).show("fast"); }) }); }); }); &lt;/script&gt; &lt;div style="float:left;width:237px;height:420px;background: rgba(255, 0, 0, .5);margin-right:15px;" id="block_1"&gt; &lt;div id="category1"&gt;Category 1&lt;/div&gt; &lt;div id="category2"&gt;Category 2&lt;/div&gt; &lt;div id="category3"&gt;Category 3&lt;/div&gt; &lt;div id="category4"&gt;Category 4&lt;/div&gt; &lt;div id="category5"&gt;Category 5&lt;/div&gt; &lt;/div&gt; &lt;div style="float:left;width:164px;height:500px;background: rgba(255, 0, 0, .5);margin-right:2px;margin-top:10px;margin-left:4px;" id="block_2"&gt; &lt;div class="category1" id="subcat1"&gt;Sub Category 1&lt;/div&gt; &lt;div class="category1" id="subcat2"&gt;Sub Category 2&lt;/div&gt; &lt;div class="category1" id="subcat3"&gt;Sub Category 3&lt;/div&gt; &lt;div class="category2" id="subcat4"&gt;Sub Category 4&lt;/div&gt; &lt;div class="category2" id="subcat5"&gt;Sub Category 5&lt;/div&gt; &lt;div class="category3" id="subcat6"&gt;Sub Category 6&lt;/div&gt; &lt;div class="category3" id="subcat7"&gt;Sub Category 7&lt;/div&gt; &lt;div class="category4" id="subcat8"&gt;Sub Category 8&lt;/div&gt; &lt;div class="category4" id="subcat9"&gt;Sub Category 9&lt;/div&gt; &lt;div class="category5" id="subcat10"&gt;Sub Category 10&lt;/div&gt; &lt;div class="category5" id="subcat11"&gt;Sub Category 11&lt;/div&gt; &lt;/div&gt; &lt;div style="float:left;width:160px;height:500px;background: rgba(255, 0, 0, .5);margin-right:2px;margin-top:10px;" id="block_3"&gt; &lt;div class="subcat1" id="game1"&gt;Sub Sub Categoey 1&lt;/div&gt; &lt;div class="subcat1" id="game2"&gt;Sub Sub Categoey 2&lt;/div&gt; &lt;div class="subcat2" id="game3"&gt;Sub Sub Categoey 3&lt;/div&gt; &lt;div class="subcat2" id="game4"&gt;Sub Sub Categoey 4&lt;/div&gt; &lt;div class="subcat3" id="game5"&gt;Sub Sub Categoey 5&lt;/div&gt; &lt;div class="subcat4" id="game6"&gt;Sub Sub Categoey 6&lt;/div&gt; &lt;/div&gt; &lt;div style="float:left;width:240px;height:400px;background: rgba(255, 0, 0, .5);margin-left:17px;" id="block_4"&gt; &lt;div class="game1"&gt;Game1&lt;/div&gt; &lt;div class="game2"&gt;Game2&lt;/div&gt; &lt;div class="game3"&gt;Game3&lt;/div&gt; &lt;div class="game4"&gt;Game4&lt;/div&gt; &lt;/div&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    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.
 

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