Jquery infinite scroll - scroll bar on div not body

Go To StackoverFlow.com

5

I found a demo of infinite scroll using the masonry plugin.

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

What I would like to do is place the scroll bar on the container div. So the body will remain static.

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

Thanks

2012-04-05 15:13
by James Aspden


2

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

Container <div> CSS:

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

Container <div> HTML:

<div id="infinitescroller">
  <div>
    <p>Starting content</p>
  </div>
</div>
2012-04-05 16:37
by JohnB


2

Nesting it inside an iframe would be an option?

http://jsfiddle.net/PN4XQ/

EDIT: I have no privilege to add comments yet, so i had to answer the question

2012-04-05 15:54
by Alexandre Machado
Ads