Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Well I haven't used the quicksand plugin, but the drop down accordion effect you want should be independent of the gallery's filter functionality. (again, not having used it, I can't say say for sure)</p> <p>First I would drop the code base for the accordion menu and create your own drop down functionality. After inspecting the dom for the gallery page, what I would do is create a div element as the next sibling after the anchor tag on the image, setting it's display to none. Add a jquery toggle event to the anchor element and then add the slideDown/slideUp functionality to the toggle event. (or a slideToggle method to a click event, less code, does the same thing). If you don't want more than one slide down menu to be open at once, then use a click event to hide all dropdowns, then show current dropdown.</p> <p>Each li element would have to have a position relative (which is fine without any top, left, bottom, right properties), and each div element would have position absolute. Think of it like a drop down navigation menu. </p> <p>If the addition of the hidden div to the li element messes with the filter functionality, you could try creating a json object for each image with it's corresponding slidedown data and using a function to inject the data in a dynamically created div element.</p> <p>*EDIT: I must have missed it the first time I read, but what do you mean: <em>"And on-image-click the menu will display flavors over top of the surrounding images?"</em></p> <p>I thought you wanted the list of flavors to appear underneath the image in a drop down menu. Are you saying you want the flavors to appear in drop down underneath and at the same time, cover the other images on the page?</p> <p>*Edit 2: To answer your question..</p> <pre><code>$('a.somelink').toggle(function() { $(this).next().slideDown(200); }, function() { $(this).next().slideUp(200); }); </code></pre> <p>Or</p> <pre><code>$('a.somelink').click(function() { $(this).next().slideToggle(200); return false; }); </code></pre> <p>These two are fine if you don't mind having more than one drop down open at a time, but if you need only one open at a time then try this:</p> <pre><code>$('a.somelink').click(function() { if ($(this).hasClass('active') == true ) { $(this).next().slideUp(200); $('a').removeClass('active'); } else { $('a.somelink').removeClass('active'); $('.sub_div').slideUp(200); $(this).addClass('active').next().slideDown(200); } return false; }); </code></pre> <p>*new Edit: your li elements should look like this:</p> <pre><code>&lt;li class="item"&gt; &lt;a href="#"&gt;&lt;img src="thumbnail.jpg" /&gt;&lt;/a&gt; &lt;div class="drop_down_content"&gt;Content in Drop down&lt;/div&gt; &lt;/li&gt; </code></pre> <p>This layout should not change even after clicking the filter button</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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