I'm trying to load a php page with AJAX. The issue is that it has a "share this" button inside that uses a Javascript script being loaded in that same page.
When I load the page with AJAX, the "share this" button does not display correctly since the Javascript inside is not being loaded.
Any ideas on how I can make the Javascript in the page load?
Thanks, Alain
P.S. - I'm using jQuery for javascript
UPDATE:
I still cannot get it to work. Here is the html/js I'm trying to load:
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a href="http://www.addthis.com/bookmark.php?v=250&username=leblon" class="addthis_button_compact" addthis:url="<?php the_permalink(); ?>" addthis:title="<?php the_title(); ?>">Share
<span class="at300bs at15t_compact"></span>
</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=leblon" id="the-script"></script>
<!-- AddThis Button END -->
Here is a snippet of my javascript file:
$.ajax({ url: theURL + link+'/?from=us', success: function(html){
$('#drink').html(html);
}
Anyone?