user1058043
user1058043

Reputation: 71

JQuery independent list scrolling

I have 2 lists on one page - http://jsfiddle.net/nalsur/CneTJ/

And now I want add/create independ scrolling for each of them

How:)

Thanks

Upvotes: 2

Views: 358

Answers (1)

Matthew Cox
Matthew Cox

Reputation: 13672

You wrap each list in a div. Give the div a height and set overflow to auto.

Note: In order for the scrolling to trigger, the ul list has to have a height larger than the parent div.

.Scrollable
{
    overflow: auto;
    height: 500px;
}

<div class="Scrollable">
   <ul class="FirstUL"></ul>
</div>
<div class="Scrollable">
   <ul class="FirstUL"></ul>
</div>

Upvotes: 1

Related Questions