onigetoc / Zajax-Wordpress-ajax-navigation

Zajax is a WordPress plugin who add ajax navigation to your WordPress website. It will work with search, All form will work, like comments, it will understand links with # hash and external links or admin links.
2 stars 1 forks source link

Body class #2

Open ZukoDalton opened 4 years ago

ZukoDalton commented 4 years ago

Hi Onigetoc, and thank you for Zajax. I know you're not updating it anymore, but i will really appreciate if you could help me here.
I've been searching for 5 days, but can not find a answer. I don't know nothing of Ajax, and i'm really lost.

Zajax is working fine, i used it with a music player as in http://podzic.com/, but my issue is, the body classes won't change after ajax loading only the main content. Is it a pro feature? Or can you help me figure this out? I find another pluginbut it's slow and ugly loading, i found Zajax so much better.

i know it as something to do with calling that after the ajax load jQuery("body").removeClass().addClass(classes);

but i can't find where to put it in zajax.js.

I noted that the does reload with the class="nprogress-busy" so i try to get around the code

c.render = function (a) { if (c.isRendered()) return document.getElementById("nprogress"); t(document.documentElement, "nprogress-busy"); var b = document.createElement("div"); b.id = "nprogress"; b.innerHTML = f.template; var e = b.querySelector(f.barSelector), q = a ? "-100" : 100 * (-1 + (c.status || 0)); a = document.querySelector(f.parent); n(e, { transition: "all 0 linear", transform: "translate3d(" + q + "%,0,0)" }); f.showSpinner || ((e = b.querySelector(f.spinnerSelector)) && e && e.parentNode && e.parentNode.removeChild(e)); a != document.body && t(a, "nprogress-custom-parent"); a.appendChild(b); return b; };

I will really appreciate an answer, thank you for the plugin anyway. Joseph

onigetoc commented 4 years ago

Sorry, im very late. In pro version you can and javascript in the setting. Go to admin setting and you will find where you can and javascript

Regard Gino

Le lun. 15 juin 2020 18:53, ZukoDalton notifications@github.com a écrit :

Hi Onigetoc, and thank you for Zajax. I know you're not updating it anymore, but i will really appreciate if you could help me here. I've been searching for 5 days, but can not find a answer. I don't know nothing of Ajax, and i'm really lost.

Zajax is working fine, i used it with a music player as in http://podzic.com/, but my issue is, the body classes won't change after ajax loading only the main content. Is it a pro feature? Or can you help me figure this out? I find another pluginbut it's slow and ugly loading, i found Zajax so much better.

i know it as something to do with calling that after the ajax load jQuery("body").removeClass().addClass(classes);

but i can't find where to put it in zajax.js.

I noted that the does reload with the class="nprogress-busy" so i try to get around the code

c.render = function (a) { if (c.isRendered()) return document.getElementById("nprogress"); t(document.documentElement, "nprogress-busy"); var b = document.createElement("div"); b.id = "nprogress"; b.innerHTML = f.template; var e = b.querySelector(f.barSelector), q = a ? "-100" : 100 * (-1 + (c.status || 0)); a = document.querySelector(f.parent); n(e, { transition: "all 0 linear", transform: "translate3d(" + q + "%,0,0)" }); f.showSpinner || ((e = b.querySelector(f.spinnerSelector)) && e && e.parentNode && e.parentNode.removeChild(e)); a != document.body && t(a, "nprogress-custom-parent"); a.appendChild(b); return b; };

I will really appreciate an answer, thank you for the plugin anyway. Joseph

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/onigetoc/Zajax-Wordpress-ajax-navigation/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALTUUGNBED5CVQF2TDMBTRW2RANANCNFSM4N66XF6Q .

ZukoDalton commented 4 years ago

Hi Gino, Thank you for the answer. But i can't find the javascript code that i have to add to reload body class .. Can you help me ?

Thank you!

Le 25 juin 2020 à 00:00, Gino notifications@github.com a écrit :

Sorry, im very late. In pro version you can and javascript in the setting. Go to admin setting and you will find where you can and javascript

Regard Gino

Le lun. 15 juin 2020 18:53, ZukoDalton notifications@github.com a écrit :

Hi Onigetoc, and thank you for Zajax. I know you're not updating it anymore, but i will really appreciate if you could help me here. I've been searching for 5 days, but can not find a answer. I don't know nothing of Ajax, and i'm really lost.

Zajax is working fine, i used it with a music player as in http://podzic.com/, but my issue is, the body classes won't change after ajax loading only the main content. Is it a pro feature? Or can you help me figure this out? I find another pluginbut it's slow and ugly loading, i found Zajax so much better.

i know it as something to do with calling that after the ajax load jQuery("body").removeClass().addClass(classes);

but i can't find where to put it in zajax.js.

I noted that the does reload with the class="nprogress-busy" so i try to get around the code

c.render = function (a) { if (c.isRendered()) return document.getElementById("nprogress"); t(document.documentElement, "nprogress-busy"); var b = document.createElement("div"); b.id = "nprogress"; b.innerHTML = f.template; var e = b.querySelector(f.barSelector), q = a ? "-100" : 100 * (-1 + (c.status || 0)); a = document.querySelector(f.parent); n(e, { transition: "all 0 linear", transform: "translate3d(" + q + "%,0,0)" }); f.showSpinner || ((e = b.querySelector(f.spinnerSelector)) && e && e.parentNode && e.parentNode.removeChild(e)); a != document.body && t(a, "nprogress-custom-parent"); a.appendChild(b); return b; };

I will really appreciate an answer, thank you for the plugin anyway. Joseph

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/onigetoc/Zajax-Wordpress-ajax-navigation/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALTUUGNBED5CVQF2TDMBTRW2RANANCNFSM4N66XF6Q .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.