I have some issues with .load :
My site use this line of code to toggle a button:
$('.button').click(function(){
// my button function
});
I’ve write some little ajax call to load the div without reload, but the button action is not set:
$("#ajax-load").load('/ #content',function(){
$('#ajax-load .button').click(function(){
// my button function
});
});
This doesn’t works, the content shows correctly, but the JS functions in refreshed content not.
Any Ideas?
Try this instead:
http://api.jquery.com/on/