defunkt / jquery-pjax

pushState + ajax = pjax
https://pjax.herokuapp.com
MIT License
16.73k stars 1.97k forks source link

$.pjax({url: url, container: '.container'}) bug #650

Closed ysysdzz closed 8 years ago

ysysdzz commented 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

mislav commented 8 years ago

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.

ysysdzz commented 8 years ago

@mislav thank you!

luger1990 commented 7 years ago

@ysysdzz did it works for u? it does not work for me