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

The Archive Base Latest Questions

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

I have a div with a css overflow: scroll property. When inserting new content

  • 0

I have a div with a css “overflow: scroll” property.
When inserting new content via the jQuery method html, a scroll event is fired.
Why is that and how can I prevent that? Because I am not actually scrolling, just inserting…

http://jsfiddle.net/qWckG/

  • 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-05T09:19:06+00:00Added an answer on June 5, 2026 at 9:19 am

    You don’t need any workarounds like the above states. The reason this doesn’t work is beacuse of how you’ve created your layout. When you’re inserting “jau”, you’re removing the 800px div that it is wrapped in. The effect of this is that when you replace it with just text, the div is no longer there, and it resets the height of the container. This causes the scroll bar to disappear, which invokes the 'scroll' method.

    You need to either:

    Wrap jau in <div> jau </div>, OR:

    $('#scrollWrapper').unbind('scroll');
    $('#scrollWrapper').html('jau', function(){
      //rebind the scroll in the callback.
      $('#scrollWrapper').on('scroll', function(){
        alert("we have scrolled");
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I have a div in a webpage with the css property overflow: scroll
I have the following HTML/CSS: #scrollpanel{height:100px;overflow-x:hidden;overflow-y:scroll;width:200px} <div id=scrollpanel> <div class=listing ref_1>...</div> <div class=listing ref_2>...</div>
Suppose I have the following html: <div style=width:200px;height:200px;overflow:scroll> ... </div> If the stuff in
I have a little div with the css rules width: 100px; height:100px; overflow-y: scroll;
i have a div tag which is set to overflow:scroll in css. i have
I have a div that has CSS as following, <div style=overflow-y:scroll; height:100px;> long Text....</div>
I have a container div with the following CSS: #container { position:relative; overflow:hidden; width:200px;
i have a problem with IE8 + jQuery.css('top') function. 1) I have a DIV
I have the following simple code : HTML: <div> <img src='http://i51.tinypic.com/4kz4g5.jpg' /> </div> CSS:
I have a div with fixed width and height and overflow:scroll attribute. I would

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.