我真的被这个卡住了...
我在 div 上使用 tinyscrollbar.js 插件。在该 div 中,我有一个视口,其中包含一个段落和一个用于在 500px 和 1000px 之间切换段落高度的按钮。如何动态更新 tinyscrollbar 以注意新高度并自行纠正?(请想象还有九个其他“box_content review”div)
我尝试使用网站建议的 tinyscrollbar_update 方法,但它似乎不起作用。有人有想法吗?
谢谢
HTML -
<div id="scrollbar3">
<div class="scrollbar"><div class="track"><div class="thumb"><div class="end"></div></div></div></div>
<div class="viewport">
<div class="overview">
<div class="box_content review">
<h5 class="reviewTitle">Review title: D90 is the best camera</h5>
<img src="../../images/gen_rating_5.png" />
<div class="topCont">
<img src="../../images/profile.png" />
<p class="pros">Pros - LightWeight, Quality, Performance, Durable, Reliable </p>
<p class="cons">Cons - Expensive, Interchangable Parts </p>
</div>
<p class="reviewContent">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book...   <span><i><a class="readMore">read more</a></i></span></p>
</div>
</div>
</div>
</div>
jQuery -
$('#scrollbar3').tinyscrollbar({ sizethumb: 45 });
$(".readMore").toggle(function(){
$(this).parent().parent().parent().animate({height:530},400);
$('#scrollbar3').tinyscrollbar_update();
},function(){
$(this).parent().parent().parent().animate({height:76},400);
$('#scrollbar3').tinyscrollbar_update();
});