Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Actually, this is simple to achieve. Normally, a click on an Isotope .item can, for example, maximise it, another click minimises it. If you want interactivity inside a clicked-on Isotope .item, you simply don't attach the minimisation function to it. Instead, clicking on another Isotope .item minimises the previously selected = maximised item. By keeping track of the previously selected .item, clicks inside the maximised .item won't close it. Basic logic for an example that allows maximising and minimising only by clicking on a "header" zone inside each Isotope .item:</p> <pre><code>$(document).ready(function () { var $container = $('#container'); $container.isotope({ itemSelector: '.item', masonry: { columnWidth: 128 // corresponding to .item divs width relationships } }); // $container.isotope('shuffle'); // randomise for every new visitor $items = $('.item'); // to reference methods on all .item divs later $('.header').click(function () { // instead of registering the entire .item div (default use), only its .header div (child div) receives clicks var $previousSelected = $('.selected'); // necessary for switching if ($(this).parent().hasClass('selected')) { // use $(this).parent() (not $(this)), because the .header div is a child of the .item div $(this).parent().removeClass('selected'); $(this).parent().children('.maximised').hide(); $(this).parent().children('.minimised').show(); $items.find('.minimised, .header').removeClass('overlay'); // returns all .minimised divs to previous state after the .item is closed again } else { $previousSelected.removeClass('selected'); $previousSelected.children('.minimised').show(); $previousSelected.children('.maximised').hide(); $(this).parent().addClass('selected'); $(this).parent().children('.minimised').hide(); $(this).parent().children('.maximised').show(); $items.not('.selected').find('.minimised, .header').addClass('overlay'); // adds .overlay on each .item which is not currently .selected } $container.isotope('reLayout'); // comment out to mimick old masonry behaviour }); }); </code></pre> <p>The actual interactivity inside each Isotope .item can then be coded however you like; hardcoded or dynamic...</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.
    1. This table or related slice is empty.
    1. 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