Created
July 2, 2012 21:42
-
-
Save sloped/3035893 to your computer and use it in GitHub Desktop.
Addthis Async and conditional load script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(jQuery('.namespace_addthis').length > 0) { | |
jQuery.ajaxSetup({cache: true}); | |
jQuery(window).load(function(){jQuery.getScript('//s7.addthis.com/js/250/addthis_widget.js#pubid=', true);}); | |
jQuery(".namespace_addthis").each(function() { | |
jQuery(this).html('<div class="addthis_toolbox addthis_default_style addthis_32x32_style" ><a class="addthis_button_facebook"></a><a class="addthis_button_twitter"></a><a class="addthis_button_email"></a> <a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style"></a></div>'); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment