Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @greghy

    I’ve the same issue and it seems I find a hack/solution for this!!
    First, Beware! This solution is not “update safe” because it modify the core file. However, the process is very simple : it consist of excluding a created class name in Zajax.js.

    Steps :

    1_ Open “zajax.js” in “plugins/zajax-ajax-navigation/js”. The code is all minified!! D’ont panic and copy/paste it in https://jsbeautifier.org/. Then, generate à clean unminified copy of this, and paste it back to “zajax.js”. save, and check your site : If nothing change, it’s all good.

    2_ Next, find the line 338 in your working unminified version of “zajax.js”. It should be this one :
    a = "a[href^='" + F + "']:not(a[href*='/wp-']):not([href$='/feed'])",

    3_ Just add your custom class to exclude (here I choose “.no-ajax”) like this :
    a = "a[href^='" + F + "']:not(a[href*='/wp-']):not([href$='/feed']):not(.no-ajax)",

    4_ Now, in your template, add the class “.no-ajax” to all the <a> you want to load “normally”!! Simple, it is?

    Suggestion for developers :
    In future versions, please add this feature in the admin panel. Its nothing to do, I think…

    Have a good day
    Bye
    Q

    Thanks.

    This’ll be useful for me, because currently the feed link displays blank… neither the xml nor triggering the browser to open it with a newsreader/helper app.

    There’s also an issue with form actions…

    Zajax impedes the action of a PayPal add-to-cart form and prevents the desired action and delivering a ‘failed to load’ error.

    I don’t know enough to be able to find a workaround.

    Plugin Author onigetoc

    (@onigetoc)

    From author
    Do it work well?
    i will add it to zajax.
    but it will not work for form. I did a modification for Paypal form too.

    at the end of
    $(document).on('submit', 'form', function (e) {

    i added.

    // Do not stop Paypal form
    var thisAction = thisSubmit.attr('action');
    if (thisAction.indexOf('paypal') === -1) // prevendefault only if it's not Paypal
    e.preventDefault();

    Plugin Author onigetoc

    (@onigetoc)

    Now on zajax version 0.4
    link with class “no-ajax” will work as normal link

    That ‘// Do not stop Paypal form’ code isn’t in the zajax.js file on the version I just downloaded.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disable ajaz load for some links’ is closed to new replies.