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

  • SEARCH
  • Home
  • 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 7999435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:30:20+00:00 2026-06-04T15:30:20+00:00

I want to be able to check whether or not an event is occurring

  • 0

I want to be able to check whether or not an event is occurring at the time a function is called. I have a function being called when my custom scroll bar is being dragged using .draggable() up and down and I also have a function being called when my container is scrolling. The problem is that both run at the same time which makes it act buggy.

So my question is how do I do an “if” statement checking whether or not the scroll bar is currently being dragged so I can stop it from executing the rest of the function’s code?

I am not asking if an element has an event “binded” to it or not, but rather if that event is being triggered at a particular moment.

Can I do this? Or do I need to take another approach?

Here’s what my code looks like:

$('.container').scroll(function(){
    //get the heights of the container and it's contents and the difference
    //get the height of the scroll bar and it's container and the difference
    //declare the top property of scroll bar from this info
});
function scrolly() {
    //get the heights of the elements described above
    //declare the scrollTop of the container
}
$('.bar').draggable({
    axis: 'y',
    containment: 'parent',    
    drag: function() {
        scrolly();
    }
});
  • 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-04T15:30:22+00:00Added an answer on June 4, 2026 at 3:30 pm

    Update

    You can use this condition to find out if your bar is being dragged:

    if ($('.bar').is('.ui-draggable-dragging')) {
        return; // bar is being dragged
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following migration and I want to be able to check if
I have functions A => Double . I want to check whether two such
I want to create a custom Data annotation Validator to check whether all the
I want to be able to check in to foursquare from a microcontroller. Now
I want to be able to check a string to see if it has
I want to be able to provide a default comment template when developers check
I want to be able to enter a value and check if it is
I want to be able to validate a user's inputted regex, to check if
I want to be able to take an image that i have already captured
I want to be able to replicate only the folder structure (not the contents)

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.