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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:23:48+00:00 2026-06-07T19:23:48+00:00

EDIT: Perhaps I am approaching this wrong – does anyone know any way of

  • 0

EDIT:

Perhaps I am approaching this wrong – does anyone know any way of stopping the page from scrolling with the mouse wheel? Can this even be disabled?

—

I have a div container filled with smaller div’s which animate when the mouse wheel is scrolled. This is not a div with overflow:hidden, and it has no scrolling areas – it is just a simple jquery animation (the animation works fine btw).

Unfortunately despite all my best efforts I cannot stop the entire page from scrolling whilst the mouse is inside the container div.

I am using Brandon Aaron’s mousewheel plugin for jQuery (which is supposed to solve my problem, but unfortunately it isnt).

Here is my javascript:

$('#containerDiv').mousewheel(function(event,delta,deltaX,deltaY){
    /* all of this is supposed to stop the page from scrolling...  but it doesnt*/
    event.bubbles=false;
    event.cancelBubble=true;
    if(event.preventDefault) event.preventDefault();
    if(event.stopPropagation) event.stopPropagation();
    if(event.stopImmediatePropagation) event.stopImmediatePropagation();
    $(document).blur();
    $(this).focus();

    /*this function just animates the divs inside the container divs*/
    animateDivs(delta);
});

Ive been through these questions already:

Prevent scrolling of parent element?

stop mousewheel's continued effect

stop scrolling of webpage with jquery

and none of them seem to help.

Can anyone offer a better solution to this problem?

  • 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-07T19:23:50+00:00Added an answer on June 7, 2026 at 7:23 pm

    You can use galambalazs’s solution as Guilherme Torres Castro answered. But it doesnt cancel scroll event. If you want cancel scroll event, you must add it.
    My fiddle solution inspirate by ntownsend’s post.

    Problem of this solution is “blicking”(hiding/showing) scrollbar. So I add scroll to actual scroll position on window.onScroll event and my FINAL SOLUTION is here

    Final solution has problem when I try scrolling, but event beforeScroll doesnt exist https://stackoverflow.com/a/3352244/1102223

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

Sidebar

Related Questions

Are there any editors that can edit multi-gigabyte text files, perhaps by only loading
EDIT: There's now a doc page on this so this question is irrelevant, also
If you look at the image http://www.pitchinteractive.com/img/mozart_1.jpg , does anyone know of a jQuery
EDIT: This post was originally specific to ASP.NET, but after thinking about it I'm
edit alright, I guess C is painful in nature--Just, this part, is particularly painful.
Apple announced a higher res display for the iPhone 4, yesterday. What does this
EDIT: Duplicate of Should Entity Framework Context be Put into Using Statement? I've been
EDIT: Now a Major Motion Blog Post at http://messymatters.com/sealedbids The idea of rot13 is
EDIT: I used, finally, inotify. As stefanB says, inotify is the thing to use.
EDIT 1 I apologize but after reading the 2 suggested articles I still don't

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.