Closed ysysdzz closed 8 years ago
$('.container').delegate('.ui-add-btn', 'click', function () { var url = $(this).data('link'); //url is /datainsight/dashboard/toAdd $.pjax({url: url, container: '.container'}) }); when i click that button is not local refresh。 all page refresh
I think you will need to add a return false after $.pjax call to prevent the original click event from activating the link/form submit.
return false
$.pjax
@mislav thank you!
@ysysdzz did it works for u? it does not work for me
$('.container').delegate('.ui-add-btn', 'click', function () { var url = $(this).data('link'); //url is /datainsight/dashboard/toAdd $.pjax({url: url, container: '.container'}) }); when i click that button is not local refresh。 all page refresh