I'm prepending the markup retur开发者_开发百科ned after an jquery ajax() call [the success part of the code as below]
success: function(html){
    $("ul#lists").prepend(html);
    $("ul#lists li:first").fadeIn("slow");
}
When the prepend is success, I want the page to automatically scroll to the position where the prepend is happening. I'm not sure of the syntax but the following is something like what I want.
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");
    }
So how do I do that?
You can use this plugin by Ariel Flesler.
Hi u can use this , were id is element id where page has to be scrolled.
$('html, body').animate({scrollTop: $("#"+id).offset().top}, 2000);
Keep laughing.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论