Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Joyn
  • #237307
    barefootMarc
    Member
    Post count: 174

    Interested in knowing if anyone is familiar with making a div scroll outside an other div.

    scrollBy works, but moves the whole page up and down. I just want the wrapper div inside the menu to move up and down.

    Cheers,

    Marc

    #237319
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please attach a marked screenshot to indicate the scroll div.
    Thanks
    Mohammad

    #238181
    barefootMarc
    Member
    Post count: 174

    Hi

    Its the pop out menu on the right.

    Attachments:
    You must be logged in to view attached files.
    #238183
    barefootMarc
    Member
    Post count: 174

    Here’s the jQuerry

    /* ——— scroll menu ————-*/
    var scrolled=0;

    $(document).ready(function(){

    $(“.arrow-down”).on(“click” ,function(){
    scrolled=scrolled+300;

    $(“.sf-va-middle”).animate({
    scrollTop: scrolled
    });

    });

    $(“.arrow-up”).on(“click” ,function(){
    scrolled=scrolled-300;

    $(“.sf-va-middle”).animate({
    scrollTop: scrolled
    });

    });

    });

    #238253
    barefootMarc
    Member
    Post count: 174

    Fixed it with this:

    I gave the table class=sidebar-menu and made sure the height was set to a px value not %

    (function () {

    var scrolled = 75;
    $(‘.arrow-up’).click(function() {
    $(“.sidebar-menu”).animate({
    scrollTop: $(“.sidebar-menu”).scrollTop() – scrolled
    });
    });

    $(‘.arrow-down’).click(function() {
    $(“.sidebar-menu”).animate({
    scrollTop: $(“.sidebar-menu”).scrollTop() + scrolled
    });
    });

    })();

    #238290
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Brilliant! I am glad that you managed to resolve the issue.
    Thanks
    Mohammad

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register