jQuery : Scroll to top/bottom of a specific DIV

Scroll to the bottom of the div:
 $jq('#divWithOverflowAuto').animate({   
         scrollTop: $jq('#divWithOverflowAuto')[0].scrollHeight}  
      );  
 }  
Or you can use:
 $jq('#divWithOverflowAuto').animate({   
   scrollTop: $jq('#divWithOverflowAuto').attr('scrollHeight')}  
 );  
}  

Scroll to the top of the div:

 $jq('#divWithOverflowAuto').animate({   
         scrollTop: 0 }  
      );  
 }  

2 comments:

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...