Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using Pjax, the target page is returned without replace the container #728

Open
xiaozhe19 opened this issue Feb 28, 2020 · 0 comments

Comments

@xiaozhe19
Copy link

I use Pjax like this
1.html

<div id="container">hello world</div>
<a data-left href="./2.php">Change</a>
 <script> 
        $(document).pjax('a[data-left]', '#container',);
</script>

2.php

<?
echo "<h2>Pjax succeed!</h1>"
?>

But it just switched to 2.php.
How do I solve this problem

@xiaozhe19 xiaozhe19 changed the title When using Pjax, the target page is returned? When using Pjax, the target page is returned without replace the container Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant