Reputation: 14244
I am trying to implement jScrollPane. But I am getting a number of errors in my console. They are all TypeError: $drag[0] is undefined. maxY = trackHeight - $drag[0].offsetHeight;
Scrollpane is recognising the div - it wraps it in jScrollPaneScrollable and removes the standard browser scrollbars - but doesn't apply it's scrollbars or allow me to scroll at all and I get the above mentioned error in my console.
My HTML:
<div id="homePageOffersWindow">
<div class="homePageOffersContainer">
<div class="homePageOfferBlock">
<h3>HELI HIKES</h3>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. </p>
<p><strong>Save $23 per person</strong></p>
<div class="clear"></div>
<a href="#" class="stdButton whiteBlue">MORE DETAILS</a>
</div>
<div class="homePageOfferBlock">
<h3>HELI HIKES</h3>
<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. </p>
<p><strong>Save $23 per person</strong></p>
<div class="clear"></div>
<a href="#" class="stdButton whiteBlue">MORE DETAILS</a>
</div>
</div>
</div>
The jQuery:
$('#homePageOffersWindow').jScrollPane();
The CSS:
#homePageOffersWindow{height: 200px; overflow: auto}
.homePageOffersContainer{}
.homePageOfferBlock{margin:0 0 20px;}
.homePageOfferBlock:last-child{margin-bottom: 0}
Any ideas?
Upvotes: 0
Views: 2114
Reputation: 88
try to call jquery 1.4.2 instead of your jquery version
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
Upvotes: 1