我已将滚动热点左右区域设置为不透明,现在意味着当我加载页面时,第一个图像被剪切到左侧。当我使用scrollToElement函数时会发生同样的问题。Jquery Smooth scrollToElement offset
要解决的第一个图像被切断我用这个,它工作正常:使用以下
$("#jumpToPrint").click(function() {
$("div#makeMeScrollable").smoothDivScroll("scrollToElement", "id", "imgPrint");
});
尝试:
#makeMeScrollable div.scrollableArea img{
padding: 0 30 0 30;} //as my scrollinghotspots are 30px wide
我scrollToElement图像仍然被切断,左不过但它没有解决问题:
$("div#makeMeScrollable").smoothDivScroll("scrollToElement", "id", "imgPrint").offset().left - 30;
非常感谢任何帮助,欢呼!
如果没有看到你的html,很难说出发生了什么。你应该在[jsfiddle](http://jsfiddle.net/)中做一个例子。 – devnate