开发者

Using jScrollPane to scroll to a certain position

开发者 https://www.devze.com 2023-03-18 16:41 出处:网络
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 fro

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

0

精彩评论

暂无评论...
验证码 换一张
取 消