I need to refresh div every time when button is clicked... When I press button first time it works but not after first time...
Here is code:
$(document).on('ready page:change', function(){
$("a").click(function(){
$("#refresh").load( "/home #content", function() {
});
});
});
use below code . its event delegation issue.
$(document).on('ready page:change', function(){
$(document).('click','a',function(){
$("#refresh").load( "/home #content", function() {
});
});
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.