View Single Post
  #10  
Old 25 Jul 2016, 15:34
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
Actually, if you use window onload handler, you can safely use jQuery inside the handler as the jQuery has been loaded completely at that point even if the script was inserted before the jQuery include. Although I don't like using window onload for this particular issue because if a thread has multiple large images, the browser has to wait for them to be completely loaded before the Discus code is executed and initialized. And besides, window onload is not necessary.

I recommend using pure JS without window onload.
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote