• 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

    https://ww.wp.xz.cn/plugins/top-10/

Viewing 1 replies (of 1 total)
  • Plugin Author WebberZone

    (@webberzone)

    Hi, thanks for the code. I’m not familiar with this one, but happy to implement it eventually once I notice that it works well.

Viewing 1 replies (of 1 total)

The topic ‘jQuery call before jquery is loaded’ is closed to new replies.