I use the Piety plugin on a website that displays leader profiles. Each profile contains a different number of elements to which Piety applies, and I found that it $(document).readystarts before all these elements have loaded.
My solution so far has been to move Piety from $(document).readyto $(window).load- which works great for most profiles. However, the people at the top of the leaderboard have extremely large profiles, which creates a rather long wait before they $(window).loadstart working and work through all the elements of Piety.
I am wondering if there will be any performance problems if I have to call each pie separately as they load, instead of waiting $(window).loadand letting jQuery do everything all at once.
Sort of..
From:
$(window).load(function(){
$("span.pie").peity("pie", { ... })
});
To:
function loadPie(id){
$("#"+id).peity("pie", { ... })
}
.. and then loadPie after each item.
source
share