平滑Div向左滚动热点显示光标,但不滚动,向右滚动过快



所以,我已经将Thomas Kahn的Smoothdiv Scroll实现为Wordpress主题,然后使用Zenfolio插件显示Zenfolio画廊的滚动图像。Zenfolio插件似乎工作得很好,但Smooth Div Scroll似乎工作不正常。它可以自动滚动,但左侧热点显示,但没有响应,右侧热点使滚动过快。你可以检查代码,但我的设置非常慢,它不应该移动得那么快。

这是我正在使用的代码:

HTML:

<div id="feature-slideshow">
<div id="makeMeScrollable">
    <img src="http://wiltonphotography.zenfolio.com/img/s11/v27/p1106836720-4.jpg?sn="  class="portfolio-img">
    <img src="http://wiltonphotography.zenfolio.com/img/s1/v55/p1106836968-4.jpg?sn="  class="portfolio-img">
    <img src="http://wiltonphotography.zenfolio.com/img/s2/v58/p1106833686-4.jpg?sn="  class="portfolio-img">
    <img src="http://wiltonphotography.zenfolio.com/img/s1/v55/p1106834346-4.jpg?sn="  class="portfolio-img">
    <img src="http://wiltonphotography.zenfolio.com/img/s4/v62/p1106834158-4.jpg?sn="  class="portfolio-img">
    <img src="http://wiltonphotography.zenfolio.com/img/s2/v61/p1106834196-4.jpg?sn="  class="portfolio-img">
    <img src="http://wiltonphotography.zenfolio.com/img/s2/v58/p1106834786-4.jpg?sn="  class="portfolio-img">
    <!-- /zfp_photoset -->
</div>
</div>

CSS:

#makeMeScrollable { width:100%; height: 630px; position: relative; }
#makeMeScrollable div.scrollableArea img { display: none; position: relative; float: left; margin: 0; padding: 0 50px 0 0; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; }
#makeMeScrollable div.scrollableArea img:first-child { padding-left: 340px; }
/* Invisible left hotspot */
div.scrollingHotSpotLeft { min-width: 50px; width: 10%; height: 100%; background-image: url(img/big_transparent.gif); background-repeat: repeat; background-position: center center; position: absolute; z-index: 200; left: 0; cursor: url(img/cursors/cursor_arrow_left.png), url(img/cursors/cursor_arrow_left.cur),w-resize; }
/* Visible left hotspot */
div.scrollingHotSpotLeftVisible { background-image: url(img/arrow_left.gif); background-color: #fff; background-repeat: no-repeat; opacity: 0.35; -moz-opacity: 0.35; filter: alpha(opacity = 35); zoom: 1; }
/* Invisible right hotspot */
div.scrollingHotSpotRight { min-width: 50px; width: 10%; height: 100%; background-image: url(img/big_transparent.gif); background-repeat: repeat; background-position: center center; position: absolute; z-index: 200; right: 0; cursor: url(img/cursors/cursor_arrow_right.png), url(img/cursors/cursor_arrow_right.cur),e-resize; }
/* Visible right hotspot */
div.scrollingHotSpotRightVisible { background-image: url(img/arrow_right.gif); background-color: #fff; background-repeat: no-repeat; opacity: 0.35; -moz-opacity: 0.35; filter: alpha(opacity = 35); zoom: 1; }
div.scrollWrapper { position: relative; overflow: hidden; width: 100%; height: 100%; }
div.scrollableArea { position: relative; width: auto; height: 100%; }

JS:

<script src="<?php echo get_template_directory_uri(); ?>/js/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.mousewheel.min.js" type="text/javascript"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/jquery.smoothdivscroll-1.2-min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        // None of the options are set
        $("div#makeMeScrollable").smoothDivScroll({
            mousewheelScrolling: true,
            hotSpotScrollingStep: 5,
            visibleHotSpotBackgrounds: "",
            autoScrollingMode: "onstart"
        });
    });
</script>

你可以在这里看到问题:traviswilton.com

有人看到我哪里错了吗?非常感谢。

事实证明,Smoothdiv Scroll jQuery与我使用的Google CSS3 Media Queries JS的交互很差。我尝试更改级联顺序,但似乎不起作用。对于这个网站,CSS3媒体查询JS是不必要的,所以我只是把它去掉了,它的平滑潜水滚动工作得很好。

这不是一个大问题,但如果Smooth Div Scroll或CSS3 Media Queries解决了这个问题,那就太好了。

最新更新