<a id="LoadButton">load</a>
$('#LoadButton').click(function () {
...
...
}).appendTo(div);
$('<br/>').appendTo(div);
});
$("#leftGrid").append(div);
After click I append data into ‘leftGrid’ div.
Everything works great! The problem is that if you will click twice on the load link button the data will be append twice… 3 clicks will append 3 times… how can I set the link button to reset the div before every load?
Is your
#leftGrida DIV?Try
This is replace all html inside
#leftGridwith the variablediv‘s valuables