Incompatibility between Alex King’s “Share This” plugin and jQuery
-
Hello everyone!
I created a new theme and I integrated some elements in jQuery (specifically a system of tabs). Since “global” objects are stored inside the jQuery namespace, the function of the Share This form doesn’t work while the tabs are working.
As specified in a jQuery documentation (https://docs.jquery.com/Using_jQuery_with_Other_Libraries), I inserted a code to avoid a conflict between jQuery and Prototype (the one that Share This uses):
<script> jQuery.noConflict(); // Use jQuery via jQuery(...) jQuery(#container-4).ready(function(){ jQuery("div").hide(); }); // Use Prototype with $(...), etc. $('akst_form').style.display = 'none'; </script>
This code is supposed to substitute the “$” of the jQuery function (in this case, it is the one there) and change it for jQuery itself, and leave the akst_form as it is, so they do not collide with each other.
Well, the fact is that it doesn’t work at all. The tabs work but when I click the “Share This” link at each post, instead of coming out the form, it redirects to a new form in a new page.
I have checked and the form code is active and in the footer, correctly. Prototype.js is also in the right place.
Any ideas?
Thanks so much in advance,
Antonio
- The topic ‘Incompatibility between Alex King’s “Share This” plugin and jQuery’ is closed to new replies.