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

wordpress admin bar #24

Open
enkhtulga opened this issue Feb 4, 2016 · 1 comment
Open

wordpress admin bar #24

enkhtulga opened this issue Feb 4, 2016 · 1 comment

Comments

@enkhtulga
Copy link

I have implemented this scripts on wordpress but Wordpress admin bar has displayed and i need to calculate it while scrolling up.

If scrolling up works then it has not included wordpress admin bar height. How to include it?

Sorry for my bad english, I hope you understand.

Thanks for your help?

@Kimzi
Copy link

Kimzi commented Jul 22, 2016

Hi!

On line 59 I changed this :
if (y >= minY) { $bar.css({ 'position': 'fixed', 'top': 0 }); }

To this :
if (y >= minY) { if ($("body").hasClass("admin-bar")) { $bar.css({ 'position': 'fixed', 'top': 32 }); } else { $bar.css({ 'position': 'fixed', 'top': 0 }); } }

The only issue I've got now though is scrolling down is a lil buggy, don't know how to fix that yet. Think I need to specify the extra margin somewhere.

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