Reputation: 413
hi i am using pjax along side with html, javascript and php. i have been running a lot of problem with pjax like, while load a php page, and alos javascript, so i am trying to using pjax alongside of normal url, so that when a user click on a pjax link it will load via pjax without refreshing pjax, also if user click on a link(that does not use pjax) it will load the full page like default html link.
the problem is pjax optimize every link in the page so i cant use link for full page loading. i can use button to load the full page, but i want to know if i can use links(like <a href=''>
).
Upvotes: 0
Views: 681
Reputation: 691
I am not quite understanding what your question is... You can use pjax with normal href. I would even recommend it, it needs less change.
My best guess about your question: How can I make one link use pjax and another use normal reload?
JS:
$(document).pjax('a[data-pjax]', '#container', { fragment: '#container' });
HTML:
<a data-pjax href="..."> Pjaxified Link</a>
<a href=".."> Normal Link </a>
<div id="#container"> Load pjax stuff here</div>
More info here: https://github.com/defunkt/jquery-pjax#usage
If that doesnt help you, please specify your question!
Upvotes: 1