Note that there are some explanatory texts on larger screens.

plurals
  1. POisotope resort without moving the first element
    primarykey
    data
    text
    <p>I'm trying to implement the <a href="http://isotope.metafizzy.co/index.html" rel="nofollow">isotope</a> lib so elements sort around my menu. After some research and tooling around I opted to set the first element in the isotope container as the menu item. I then filter it out of any manipulation I do as far as filtering or sorting.</p> <p>I opted for this method as opposed to the corner-stamp method due to limitations on corner-stamping only working on elements right justified (from what I understand - I could just be miss using it though..). I'd like the menu to be in the top left hand corner.</p> <p>The problem I'm running into is on shuffle. I'm trying to randomize the positions of all elements EXCEPT the first element (in this example the menu). I want to keep the menu in its place. When I try to use the shuffle to randomly reorder all the elements, I can't filter out my menu item from the available list to shuffle. This causes some navigation.. issues when the sub nav decides to fly away.</p> <p>Here is an example layout: <a href="http://jsfiddle.net/ufomammut66/xwpuk/30/" rel="nofollow">http://jsfiddle.net/ufomammut66/xwpuk/30/</a></p> <p>So far I've tried: <code>$('.container').isotope('shuffle');</code></p> <p>This function only has 1 parameter - a callback. I don't see how I could manipulate the selection process here.</p> <p>I've considered using the sort function, but for some reason I cannot get: <code>$('.container').isotope({ sortBy : 'random' });</code> to fire more than once. Even if I did I still don't see how I could leverage this to filter out my menu.</p> <p>Any help would be greatly appreciated, thanks!</p> <p><strong>EDIT :</strong> Updated jsFiddle link to include numbers on the sortable objects - helps show sorting work.</p> <p><strong>EDIT 2 :</strong> Added more detail to issue.</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.
 

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