Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8447227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:07:59+00:00 2026-06-10T10:07:59+00:00

What I have currently is a very simple div that has a flexcroll scroll

  • 0

What I have currently is a very simple div that has a flexcroll scroll bar. This simple div contains some draggable itmes inside of it. My goal is to be able to drag one of the items and and move it about without the flexcroll scroll bar moving.

As it stands right now if I were to drag one of the items below the viewable area the simple div will scroll down. I would like to prevent this.

I’m using jQuery UI for the draggable items. I’ve already tried using the option “scroll:false” but this does not work for flexcroll.

I’m sorry I don’t have any example code, I’m currently away from my work computer.

flexcroll: http://www.hesido.com/web.php?page=customscrollbar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:08:00+00:00Added an answer on June 10, 2026 at 10:08 am

    I don’t know if you have already resolved this problem. This morning, I have the same problem and I found your post. After that, I have googled a lot to find a solution without any lucky. So finally, I decided to do someting myself, I hope my idea will help you.

    After read the Programming Guid, I found that in this version (2.0) of flexcroll, we could register a function for onfleXcroll whose description could be found by searching the keyword “Pseudo-event: onfleXcroll”. This is to say that the method will be executed after a scroll is done. So here, what I restore the “top” style with the value before you drag an element.

    Here are the code

    var $assetswrapper; // This variable indicates the contentwrapper of you div.
    var $assetsscrollbar; // This variable indicates the vscroller of you div.
    window.onfleXcrollRun = function () { // This method will be executed as soon as the div has been rendered with the help of flexcroll
    // You could find these two divs by using firebug, because the top value of these two divs will be changed when we scroll the div which use the class .flexcroll.
    $assetswrapper = $('#contentwrapper');
    $assetsscrollbar = $('#vscrollerbar');
    }
    
    var wrapperTopPosition = 0; // This is used to stock the top value of the wrapperContent before dragging.
    var scrollbarTopPosition = 0; // This is used to stock the top value of the scrollbar before dragging.
    var dragged; // This is a boolean variable which is used for indicating whether the draggable element has been dragged.
    var dropped = false; // This is a boolean variable which used to say whether the draggable element has been dropped.
    $('.draggable').draggable({ // you could change .draggable with any element.
    start: function (event, ui) {
        // Your code here.
    
        wrapperTopPosition = $assetswrapper.position().top;
        scrollbarTopPosition = $assetsscrollbar.position().top
        dragged = true;
    },
    stop: function (event, ui) {
        // Your code here.
    
        dragged = false;
        dropped = true;
    }
    });
    
    $('your drag div')[0].onfleXcroll = function () { // This method will be called each time when a scroll has been done.
    if (dragged) {
        $assetswrapper.css('top', wrapperTopPosition);
        $assetsscrollbar.css('top', scrollbarTopPosition);
    } else {
        // Code here is used for keeping the top position as before even though you have dragged an element out of this div for a long time.
        // You could test the scrollbar without this piece of code, if you drag an element out of the div for a long time, the scrollbar will keep its position, 
        // but after you dropped this element and try to scroll the div, then the scrollbar will reach the end of the div. To solve this problem,
        // I have introduced the method setScrollPos with the old top position plus 72. 72 here is to set the scroll increment for this scroll, I know 
        // this value is not fit for any size of windows, but I don't know how to get the scroll-increment automatically.
        if (dropped) {
            dropped = false;
    
            $('your drag div')[0].fleXcroll.setScrollPos(false, Math.abs(wrapperTopPosition) + 72);
            $('your drag div')[0].fleXcroll.setScrollPos(false, Math.abs(wrapperTopPosition) + 72);
        }
    }
    };
    

    I hope this could give you a help if you haven’t found any solution yet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a very simple intranet that we are using for some basic
I have a (currently very simple) website that is utilising Facebook's Website with Facebook
I have some very simple sample code like this: $.ajax({ url: 'demo2.htm', success: function(loadeddata){
I have some very simple sample code like this: $.ajax({ url: 'demo2.htm', success: function(loadeddata){
In cocos2D I currently have a very simple particle emitter initialized like this: turnEmitter
I currently have a very simple MySQL database (articlesDB) with 1 table (articles) and
Very simple + silly question: Does clojure provide multi maps? I currently have something
I have a very simple interface which needs to communicate between processes. It's currently
im currently learning python (in the very begining), so I still have some doubts
I have a very simple HTML. Due to some limitations, I cannot modify the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.