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

Body class #2

Open
ZukoDalton opened this issue Jun 15, 2020 · 2 comments
Open

Body class #2

ZukoDalton opened this issue Jun 15, 2020 · 2 comments

Comments

@ZukoDalton
Copy link

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
Copy link
Owner

onigetoc commented Jun 24, 2020 via email

@ZukoDalton
Copy link
Author

ZukoDalton commented Jun 25, 2020 via email

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

2 participants