Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( scrollIntoView ) {
- surfaceView = this.surface.getView();
- offset = top + surfaceView.$element.offset().top;
- windowScrollTop = surfaceView.$window.scrollTop() + this.surface.toolbarHeight;
- windowScrollHeight = surfaceView.$window.height() - this.surface.toolbarHeight;
- if ( offset < windowScrollTop || offset > windowScrollTop + windowScrollHeight ) {
- surfaceView.$( 'body, html' ).animate( { scrollTop: offset - ( windowScrollHeight / 2 ) }, 'fast' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement