Is there anyway to get the Portfolio page to load in a random order. I see some past responses from years ago, but they don't seem to work.
Random Portfolio Display
4 replies · opened Apr 23, 2022
This is resolved.
Hello,
You can consider using the following code at the bottom of the Page:
[ch_pre]
jQuery(window).on( 'pluginIsotopeReady', function() {
jQuery('.grid-container').isotope('shuffle');
});
[/ch_pre]
This will definitely work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
A little more background since my initial post. I had found some guidance elsewhere in this forum using:
jQuery(window).on( 'load', function(){
setTimeout( function() {
jQuery('.grid-container').isotope('shuffle');
}, 500 );
});
However, the code you posted looks more optimized so I tried, but it does not work.
I have reverted my working page, but left one with the code you suggested:
https://www.aaronbonine.com/portfolio-birds-shuffle-test.html
Note that the console says:
isotope not initialized. Cannot call methods, i.e. $().isotope("shuffle")
(anonymous function) — plugins.min.js:1:247224
(anonymous function) — plugins.min.js:1:246861
each — jquery.js:160
(anonymous function) — plugins.min.js:1:246710
(anonymous function) — portfolio-birds-shuffle-test.html:582
dispatch — jquery.js:1950:213
trigger — jquery.js:3219:112
(anonymous function) — jquery.js:3235
each — jquery.js:160
execPlugin — functions.js:122
jsLinking — functions.js:193
functions — functions.js:237
gridInit — functions.js:1410
init — functions.js:2179
dispatch — jquery.js:1950:213
Selected Element
<h1>Birds</h1>
Hello,
Apologies about this!
We had tested the codes in our local dev files but the actual load time may differ in the Online Files which is why it is not working on your Website. Please consider using this optimized codes:
[ch_pre]
jQuery(window).on( 'pluginIsotopeReady', function() {
setTimeout( function() {
jQuery('.grid-container').filter('.has-init-isotope').isotope('shuffle');
}, 750);
});
[/ch_pre]
This should definitely work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard