私はここで特別な「問題」を抱えています。クライアントからのリクエストに対応するには、次のことを行う必要があります。ページ上のすべてのテーブルを実行します。各テーブルについて、正確に 2 つの TD があるかどうかを確認します。そうであれば、「続きを読む」の実装を行う必要があります。
折りたたんで展開したい正確なdivを知っている別のページでこれを使用しました。
$(".more-block").each(function(){
if ($(this).height() > adjustheight){
id = this.id;
id = id.split("_");
$("#expand"+id[1]).toggle(function() {
id = this.id;
$(".more-block"+id).css('height', 'auto').css('overflow', 'visible');
$('html, body').animate({scrollTop: $(document).height()}, 'slow');
$("#"+id).attr('src',path+'/images/expand2.png');
$(".frontpage_box").css('height', '');
}, function() {
id = this.id;
$("#"+id).attr('src',path+'/images/expand.png');
$(".more-block"+id).animate({height: adjustheight}, "slow", function(){
$(".more-block"+id).css('height', adjustheight).css('overflow', 'hidden');
});
});
};
});
$(".more-block").css('height', adjustheight).css('overflow', 'hidden');
何か案は?TD を実行すると、クラス "more-less" と "more-lessexpand1" (数値はインクリメント) を追加するだけで済みます。これは可能ですか?テーブルを実行する方法がわかりません.2つのTDが見つかった場合にのみこれを実行し、2番目のTDで最後のビットのみを実行します.
ああ、ちなみに...重要なのは、崩壊して展開する唯一の 2 番目の TD です。左のものは許可されていません。誰かが関心のある TD を見つけるのを手伝ってくれれば、この最後のビットを解決できるかもしれません。
助けてください