diff --git a/ecosystem/ecosystem.html b/ecosystem/ecosystem.html index f2ef7d73c5e3..e3397a527a9e 100644 --- a/ecosystem/ecosystem.html +++ b/ecosystem/ecosystem.html @@ -121,6 +121,18 @@

$(this).attr("data-date-added", date); }); + //Randomize Ecosystem cards on page reload + $.fn.randomize = function(ecosystemCards) { + (ecosystemCards ? this.find(ecosystemCards) : this).parent().each(function() { + $(this).children(ecosystemCards).sort(function() { + return Math.random() - 0.5; + }).detach().appendTo(this); + }); + return this; + }; + + $('#ecosystem-index-cards').randomize('#ecosystemCards'); +