Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #678832

    Jeroen B
    Participant

    Dear,

    i have problems getting this function to run:
    jQuery(document).ready(function($) {
    $(window).scroll(function() {
    var scroll = $(window).scrollTop();

    if (scroll >= 500) {
    $(“.sidebar”).addClass(“fixed”);
    } else {
    $(“.sidebar”).removeClass(“fixed”);
    }
    });
    });

    not trough the custom js in the customizer, the js option in cornerstone, not even like now when i have it in the head section.

    login and site url will follow in private

    #678834

    Jeroen B
    Participant
    This reply has been marked as private.
    #678835

    Jeroen B
    Participant

    also, on the homepage the scroll down button in the revolution slider does not work..

    #678856

    Christopher
    Moderator

    Hi there,

    The page doesn’t have sidebar, please check it.
    In regards with scroll anchor in slider, please remove custom JS and check if it solves the issue. You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

    Thanks.

    #679865

    Jeroen B
    Participant

    Oh i’m sorry, the script is this:

    jQuery(document).ready(function($) {
    $(window).scroll(function() {
    var scroll = $(window).scrollTop();

    if (scroll >= 500) {
    $(“.submenu”).addClass(“fixed”);
    } else {
    $(“.submenu”).removeClass(“fixed”);
    }
    });
    });

    #679888

    Rue Nel
    Moderator

    Hello There,

    Your code seems valid. It should work without issues. There seems to be something that prevents it from firing. Even adding this test JS doesn’t seem to work

    jQuery(function($) {
      $(window).bind('scroll', function() {
       alert('Scroll event fired!')
       console.log('Scroll event worked');
      }); 
    });

    Could you please remove any custom JS on the page? Please let us know how it goes.

    #685354

    Jeroen B
    Participant

    seems like body height 100% was the problem!

    #685492

    Thai
    Moderator

    Glad you’ve sorted it out.

    If you need anything else, please let us know 🙂