I am using jquery to scroll to a certain position when clicking play on HTML5 video player.
I have the video scrolling to the far left of the div when play is selected, but I need it to be 165px from the far left of the div.
Can anyone help please?
jQuery('video').bind(
'play',
function(e) {
e.preventDefault();
jScrollPaneAPI.scrollToElement($(this).parent(), true, true);
}
);
jQuery(document).ready(function(){
jQuery('.scroll-to-click').trigger('click');
});
Than开发者_StackOverflow社区ks
You can use scrollToX()
or scrollToY()
functions
精彩评论