Advertisement
Guest User

FindAndReplace.js

a guest
Mar 15th, 2015
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. if ( scrollIntoView ) {
  2. surfaceView = this.surface.getView();
  3. offset = top + surfaceView.$element.offset().top;
  4. windowScrollTop = surfaceView.$window.scrollTop() + this.surface.toolbarHeight;
  5. windowScrollHeight = surfaceView.$window.height() - this.surface.toolbarHeight;
  6.  
  7. if ( offset < windowScrollTop || offset > windowScrollTop + windowScrollHeight ) {
  8. surfaceView.$( 'body, html' ).animate( { scrollTop: offset - ( windowScrollHeight / 2 ) }, 'fast' );
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement