jQuery Plugin working but taking ~5sec to apply after full site loads
-
I am using a jQuery plugin (Bigtext.js) that I have used previously and had no load time issues with, and it is functioning as it should, however it takes about ~5sec to apply its effect even though nothing else on the site seems to take as long to load.
I minified the .js file and was working locally with MAMP and had this problem even then, so I do not think it is related to internet speed. I tried placing the call in the header and the footer to see if it would affect the load time and it did not seem to.
The effect can be seen on my website when hovering over a thumbnail image. If you hover over right when the page loads, the text appears very small before the effect applies, which causes it to fit each line to the width of the thumbnail.
This is the call used to apply the effect.
jQuery(document).ready(function($) { WebFont.load({ custom: { families: ['Antonio', 'AntonioLight'], }, active: function() { $('.thumbnail-text').bigtext(); } }); });
- The topic ‘jQuery Plugin working but taking ~5sec to apply after full site loads’ is closed to new replies.