• Resolved playdiune

    (@playdiune)


    Hello,

    In my personal case, in this new version, I still had to make a change to the source code, for the plugin to work correctly with the theme I use.

    file: restropress/assets/js/frontend/rp-frontend.js
    Original code:

    `// Sticky category menu on mobile
    var initTopPosition= $(‘.sticky-sidebar’).offset().top;
    $(window).scroll(function(){
    if($(window).scrollTop() > initTopPosition)
    $(‘.sticky-sidebar’).addClass(‘mobile-sticky’);
    else
    $(‘.sticky-sidebar’).removeClass(‘mobile-sticky’);
    });`

    Replaced code:

    `// Sticky category menu on mobile
    var TopPosition = $(‘.sticky-sidebar’);
    if (TopPosition.length) {
    var initTopPosition = TopPosition.offset().top;
    }
    $(window).scroll(function(){
    if($(window).scrollTop() > initTopPosition)
    $(‘.sticky-sidebar’).addClass(‘mobile-sticky’);
    else
    $(‘.sticky-sidebar’).removeClass(‘mobile-sticky’);
    });`

    I don’t know if this is a unique incompatibility of the theme that I use or not.

    I leave it for the consideration of the programmers.

    Hugs

    • This topic was modified 3 years, 9 months ago by playdiune.
Viewing 1 replies (of 1 total)
  • Plugin Contributor Bibhu Prakash Ota

    (@bibhu1995)

    Hello @playdiune,

    I checked the code and it’s working perfectly with the updated version 2.7.2.1 for sticky functionality. I think there may be some theme code conflict issues.

    Regards,
    Bibhu

Viewing 1 replies (of 1 total)
  • The topic ‘// Sticky category menu on mobile JQUERY’ is closed to new replies.