开发者

Using jScrollPane to scroll to a certain position

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜