Git Product home page Git Product logo

Comments (8)

jbutko avatar jbutko commented on August 23, 2024

StickyNavbar script remembers the position of window that was before refresh.
If I understand well the problem are those buttons above the navigation on the right side (Share, Follow us etc.) If that's the case try to remove those elements out of the element on which StickyNavbar is called (header). If you have a development site please leave the link here in the comment or email me on jbutko [at] gmail.com and I will take a look on it.

from stickynavbar.js.

Globegitter avatar Globegitter commented on August 23, 2024

@jbutko Thank you very much, just sent you an email.

from stickynavbar.js.

kaibakker avatar kaibakker commented on August 23, 2024

I am having the same problem, and its still unclear how to fix it. Its live on the following (dutch) website: http://www.examentrainingexact.nl/examentraining/1-vwo-wiskunde-a

from stickynavbar.js.

jbutko avatar jbutko commented on August 23, 2024

@kaibakker: Hi, try to reference version 1.1.3 of stickyNavbar in the script tag instead of 1.1.1 http://cdn.jsdelivr.net/stickynavbar.js/1.1.3/jquery.stickyNavbar.min.js
Let me know if that helped.

from stickynavbar.js.

kaibakker avatar kaibakker commented on August 23, 2024

Thanks @jbutko for looking at it. But its still not working? I tried some different things and changed the version number, but still the bar is hanging on reload, any other ideas?
Thanks in advance

from stickynavbar.js.

jbutko avatar jbutko commented on August 23, 2024

@kaibakker: Hi, really not sure why this happened on your site, it looks like it is working fine on my demo page. Anyway you can probably fix it with this workaround (I do not tested it properly but it should work IMO):

var leftColVertPosition = $('.l-left').offset().top,
    windowVerticalPos = $(window).scrollTop(),
    menuBar = $('#menubar');

if (windowVerticalPos > leftColVertPosition) {
  menuBar.style.top = "0";
}

Try it, adapt it if needed and let me know.

from stickynavbar.js.

kaibakker avatar kaibakker commented on August 23, 2024

Thank you! Works perfectly, eventual used this script...

$(document).ready(function () {
  $('#menubar').stickyNavbar();

  var leftColVertPosition = $('.l-left').offset().top,
    windowVerticalPos = $(window).scrollTop(),
    menuBar = $('#menubar');

  if (windowVerticalPos > leftColVertPosition) {
    menuBar.css({top: "0"});
  }
});

from stickynavbar.js.

jbutko avatar jbutko commented on August 23, 2024

No problem Kai, glad I could help.

from stickynavbar.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.