I have the AddThis js for bookmarking the details to the calender.This is working correctly on page load,but I do some filtering using ajax load and replace the html, after this the AddThis button not showing.here is my code for ajax .
$('document').ready(function () {
$('.eventSelect').change(function () {
var selectedDate = $('#eventDate').val();
var keyword = $('#eventsearch').val();
var url = "/EventsHome?eventDate=" + selectedDate + "&keyword=" + keyword;
$.ajax({
type: "GET"
, url: url
, success: function (data) {
console.log($(data).find(".eventList").html());
$(".eventList").html($(data).find(".eventList").html());
var script = 'http://s7.addthis.com/js/250/addthis_widget.js#domready=1';
if (window.addthis) {
window.addthis = null;
window._adr = null;
window._atc = null;
window._atd = null;
window._ate = null;
window._atr = null;
window._atw = null;
}
$.getScript(script);
}
, error: function (XMLHttpRequest, textStatus, errorThrown) {
}, comeplete:
window.addthis = null;
, do you mean to remove Dom? And$.getScript(script);
, do you get back the button in script? – Majestic