Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Isotope - Not working within a responsive/fluid grid
    primarykey
    data
    text
    <p>I am in the process of building a photoblog which utilises the brilliant Isotope plugin by David DeSandro but I am curently having some difficulty getting the plugin to work as intended within a responsive / fluid grid. </p> <p>www.lewismalpas.co.uk/tumblr (Demo)</p> <p>Each image is wrapped within a div (.item) which has an explicit width of 25%, as the images are flexible this in theory should allow four images to be displayed inline, however at the moment only two are being displayed and I cannot seem to figure out the issue.</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ //scroll to top of page $("a.top").click(function () { $("body,html").animate({scrollTop: 0}, 800); return false; }); //Isotope settings var $container = $('.images') $container.imagesLoaded( function(){ $container.isotope({ resizable: false, // disable normal resizing masonry: { columnWidth: $container.width() / 4 } }); // update columnWidth on window resize $(window).smartresize(function(){ $container.isotope({ masonry: { columnWidth: $container.width() / 4 } }); }); }); //layout &amp; search options $(".header #layout").hide(); $(".header a.layout").click(function() { $(".header #layout").fadeIn(); $(".header a.fullscreen").click(function() { $("a.layout-option").removeClass("selected"); $(this).addClass("selected"); $("#container").animate({width:"99%"}, function() { $(".images").isotope('reLayout'); }); }); $(".header a.grid").click(function() { $("a.layout-option").removeClass("selected"); $(this).addClass("selected"); $("#container").animate({width:"80%"}, 800); $('#images').isotope({itemSelector:'.item',layoutMode:'masonry'}); }); $(".header a.linear").click(function() { $("a.layout-option").removeClass("selected"); $(this).addClass("selected"); $("#container").animate({width:"80%"}, 800); $('#images').isotope({itemSelector:'.item',layoutMode:'straightDown'}); }); }); $(".header #search").hide(); $(".header a.search").click(function() { $(".header #search").fadeIn(); }); }); //end doc ready &lt;/script&gt; </code></pre>
    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.
 

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