Jump to content

Refresh div contents


andyd34

Recommended Posts

I am trying to refresh the contents of a division without refreshing the entire page when a button is clicked.

 

I have tried

 

$("#close_add_event").click(function(html){
$("#add_event_div").fadeOut(600);
$("#contents_inner").html(html);
});

 

I have also tried

 

$("#close_add_event").click(function(html){
$("#add_event_div").fadeOut(600);
$("#contents_inner").replaceWith($('#contents_inner', $(html))); 
});

 

But all this does is clear the contents of the div. Can anyone show me where I am going wrong. Most of the tutorials I have found are refreshing a div with external contents.

Link to comment
https://forums.phpfreaks.com/topic/175435-refresh-div-contents/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.