jQuery call before jquery is loaded
-
I started using your plugin, but have a little problem with it. The counter call is added as an ajax call in the middle of the page, and that before jquery is loaded. I changed it to wrap it in a DOMContentLoaded event so i can still load my scripts at the bottom of the pages. I think it would be a good idea to do so, cause its a good practice not to load scripts in the head.
counter.php line 63
<script type="text/javascript">document.addEventListener("DOMContentLoaded", function(event) { jQuery.ajax({url: "' . $home_url . '", data: {top_ten_id: ' . $id . ', top_ten_blog_id: ' . $blog_id . ', activate_counter: ' . $activate_counter . ', top10_rnd: (new Date()).getTime() + "-" + Math.floor(Math.random()*100000)}}) });</script>Maybe there is a better way than mine, but i think it could be a good thing to wrap it in your plugin.
Thank you in advance
The topic ‘jQuery call before jquery is loaded’ is closed to new replies.