Is it possible to refresh a single div with jQuery? I have a button that does logout a user. After the button is clicked, I want to show the login form, so I need to re-pars
I'd try:
$('#logoutbtn').on('click', function () { $.ajax({ type: "POST", url: "php/logout.php" }) .done(function(data){ $('#signup > h3').html('Please Login'); }); })
The same approach could be used for the login action to prevent the page from having to refresh.