Theme Customizer: Reset scroll to top when the preview url is changed. props ocean90, fixes #20713, see #19910.

git-svn-id: https://develop.svn.wordpress.org/trunk@20833 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-05-21 17:58:17 +00:00
parent 3ca0c089f2
commit 4370cd7063
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@
this.body = $( document.body );
this.body.on( 'click.preview', 'a', function( event ) {
event.preventDefault();
self.send( 'scroll', 0 );
self.send( 'url', $(this).prop('href') );
});
@ -83,4 +84,4 @@
});
});
})( wp, jQuery );
})( wp, jQuery );