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 8080345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:23:05+00:00 2026-06-05T16:23:05+00:00

I created a draggable div with scroll (to create scroll I used jquery plugin

  • 0

I created a draggable div with scroll (to create scroll I used jquery plugin named: nicescroll ver. 2.9.2) but the scroll doesn’t work correctly.

Everything is ok until I move the div to the different location. When I’m moving the div, scroll is staying on the old position.

On the begining I worked with custom scroll and there was no problem. The problem is when I used nicescroll plugin.

  $(document).ready(function()
  {
    $('#title').hover(function() // when mouse is on the #title do:
      { 
        $('#window').draggable({ disabled: false }); // make window "draggable"
      }, function() // when mouse is out of the #title do:
      { 
        $('#window').draggable({ disabled: true }); // make window "un-draggable" 
      }
    ); // endhover
    $("#window_content").niceScroll({boxzoom:false}); // adding the scroll
  }); // end ready

my structure of the divs is:

  <div id="window">
    <div id="title"> </div> <!-- When mouse is on the div window is draggable -->
    <div id="window_content"> 
      This div have a scroll...
    </div> 
  </div> 
  • 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-05T16:23:06+00:00Added an answer on June 5, 2026 at 4:23 pm

    I found one resultion…
    After moving the div I have to reload the scroll, to do it I can use function: getNiceScroll().resize() (I didn’t found function like: reload() or sth like this)

    It is better to hide the scroll during the move so you will not see latency between moving div and realoading scroll. To hide and show scroll I used: getNiceScroll().hide() and getNiceScroll().show()

    The code is:

    $(document).ready(function()
    {
      $('#title').hover(function() // when mouse is on the #title do:
        {
          $('#window_content').getNiceScroll().hide(); //hide scroll
          $('#window').draggable({ disabled: false }); // make window "draggable"
        }, function() // when mouse is out of the #title do:
        { 
      $("#window_content").getNiceScroll().resize();  // preload scroll
          $('#window_content').getNiceScroll().show();  // show scroll
          $('#window').draggable({ disabled: true }); // make window "un-draggable" (turn off the draggable)
      }); // endhover
      $("#window_content").niceScroll({boxzoom:false}); // adding the scroll
    }); // end ready
    

    This is not the perfect resolution because if you are moving div very fast you can see the scroll in different locations.

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

Sidebar

Related Questions

I'm using the JQuery Draggable plugin . I'm trying to create an Image Editing
I'm trying to create a draggable div (constrained to the x axis) using JQuery
i am using a jquery plugin to create some draggable objects. the plugin is
On clicking a link, a div is created which is draggable. I have another
I am trying to create a draggable div with an image. I could drag
I have a div, which has jQuery UI Draggable applied. What I want to
I'm making a jQuery plugin that creates a scrollable div. You are able to
I have a jQuery UI draggable, and I've tried to create a custom helper
I had created one div window which is draggable,and created one child div (with
i want to create a new '.b' div appendTo document.body, and it can dragable

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.