JQuery infinite scroll - scrollbar on div not body

I found a demo of endless scrolling using the Freemasonry plugin.

http://www.jquery4u.com/demos/infinite-scrolling-demo1/

What I would like to do is place the scroll bar on the div container. Thus, the body will remain motionless.

Is it possible? Please let me know if you need me to explain further.

thank

+5
source share
2 answers

Here is a simple example of what you are trying to do:

<div>CSS container :

<style type="text/css">
  /* Optional styles */ 
  #infinitescroller {
  background-color: White;
  width: 50%;
  height: 200px;
}
</style>

<div>HTML container :

<div id="infinitescroller">
  <div>
    <p>Starting content</p>
  </div>
</div>
+2
source

Nesting it inside an iframe would be an option?

http://jsfiddle.net/PN4XQ/

EDIT: I have no right to add comments, so I had to answer a question

+2
source

All Articles