javascript - AddThis in AJAX -


I'm trying to get the adhesive to work in the div tag being loaded with ADs. Submitting toolbox with javascript

I am using the code below but it does not work, any help with the function is appreciated. Thank you.

  & lt; Div id = "toolbox" & gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; Addthis.method ('# Toolbox', [Configuration Object], [Sharing Object]); & Lt; / Script & gt;  

Since I do not know about your particular problem, > Start by looking at addthis.toolbox ('. YourClass');

If you have a common toolbox like this ...
  & lt; Div id = "myToolbox" class = "toolbox adith_tolbox adithis_default_style" & gt; & Lt; One square = "addthis_button_facebook" style = "cursor: pointer" & gt; & Lt; / A & gt; & Lt; One square = "addthis_button_twitter" style = "cursor: pointer" & gt; & Lt; / A & gt; & Lt; One class = "addthis_button_email" style = "cursor: pointer" & gt; & Lt; / A & gt; & Lt; / Div & gt;   

Once your AJAX content has been loaded into the DOM, you can do the following ...

  addthis.toolbox ('# myToolbox') ;   

However, look for it!

Do not place your own buttons inside your toolbox because when you call addthis.toolbox the method will make a duplicate like button iframe for some reason. It should be a bug, but it took a few years from my life. Instead, you should put it in your own toolbox, which has a divis and also call the method on it.

In the case of multiple toolboxes

you should use a square instead. See the following code for the last example.

html

  & lt; Div class = "toolbox" & gt; & Lt; One class = "addthis_button_facebook_like" FB: like: layout = "button_code" adithis: user id = "micropany" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div class = "toolbox adith_tolbox adhesive_default_style" & gt; & Lt; One class = "addthis_button_facebook" style = "cursor: pointer" & gt; & Lt; / A & gt; & Lt; One square = "addthis_button_twitter" style = "cursor: pointer" & gt; & Lt; / A & gt; & Lt; One class = "addthis_button_email" style = "cursor: pointer" & gt; & Lt; / A & gt; & Lt; / Div & gt;   

Javascript:

  // AJAX load adithis. When the toolbox ('toolbox') is complete;    

Comments