私は本当にこれに行き詰まっています...
div で tinyscrollbar.js プラグインを使用しています。その div 内には、段落を含むビューポートと、その段落の高さを 500px と 1000px の間で切り替えるボタンがあります。tinyscrollbar を動的に更新して、新しい高さに気づき、それ自体を修正するにはどうすればよいですか? (他に「box_content review」の div が 9 つあると想像してください)
ウェブサイトが提案する 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>
Jクエリ -
$('#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();
});