1
我前面加一個jquery的AJAX()調用jquery的自動滾動()成功[如何]
success: function(html){
$("ul#lists").prepend(html);
$("ul#lists li:first").fadeIn("slow");
}
[如下面的代碼的成功部分]後返回的標記。當前置是成功,我希望頁面自動滾動到預置正在發生的位置。我不確定語法,但以下是我想要的東西。
success: function(html){
if($("ul#lists").prepend(html)) {
//Scroll to the position in the page where the prepend is about to happen
//something similar to the href="#bookmark' in html.
}
$("ul#lists li:first").fadeIn("slow");
}
那麼我該怎麼做呢?