• Resolved lennelei

    (@lennelei)


    Hi,

    first of all, a big thank you for your plugin, it’s the best notification bar for my use!

    There is only one missing (or may I be wrong?) feature: an option to auto hide on scroll (or after a delay).
    For example, I wanted to display a notification with a toggle button that would auto hide on scroll (but still be possible to show when clicking on the button).

    I don’t know jQuery and stuff like that, but I still managed to achieve that by updating your wp-notification-bars-public.js and adding something like this:

    $(window).on('scroll', function (e) {
      e.preventDefault();
      var $div = $("div.mtsnb");
      if ($(window).scrollTop() > 50) {
    ...

    the rest is just a copy/paste of the code already in place for both buttons.

    However, it’s probably not the best way 🙂 so if you wanted to add this option, that would be excellent!

    Thank you again.

    Regards.

    Alexis

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Auto Hide on scroll?’ is closed to new replies.