SHARE
TWEET

FindAndReplace.js

a guest Mar 15th, 2015 187 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.                 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top