jQuery仅在单击F12以激活开发人员模式时才有效

时间:2014-02-17 06:05:22

标签: jquery hover google-chrome-devtools wookmark

我使用sliphover.js作为方向感知悬停效果的jquery。加载页面时,悬停效果仅在单击F12或在chrome和IE10中激活inpect元素时有效。一旦开发者模式被激活或已经激活开发者模式被关闭,它就开始工作直到再次重新加载页面。 我正在使用如下的一些jquery插件。

<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/jquery.sliphover.js"></script>
<script src="js/superfish.js"></script>
<script type="text/javascript" src="js/jquery.mmenu.js"></script>
<script src="js/jquery.singlePageNav.min.js"></script>
<script src="js/modernizr.min.js"></script>
<script src="js/jquery.flexslider.js"></script>
<script src="js/jquery.imagesloaded.js"></script>
<script src="js/custom.js"></script>

我包含custom.js代码

$(function(){
    $("#tiles").sliphover();
    });

我的HTML,我也使用wookmark插件制作图库

<div id="main" role="main">
                <ul id="tiles">
                    <!--
                      These are our grid items. Notice how each one has classes assigned that
                      are used for filtering. The classes match the "data-filter" properties above.
                      -->
                    <li data-filter-class='["london", "art"]' class="hello">
                      <img src="images/gallery-image1.jpg" title="<a href='http://google.com'>Loyal Cao</a>" >
                    </li>
                    <li data-filter-class='["london", "art", "sport"]' class="hello">
                      <img src="images/gallery-image2.jpg" >
                    </li>
                    <li data-filter-class='["london", "art", "paris"]' class="hello">
                      <img src="images/gallery-image3.jpg" >
                    </li>
                    <li data-filter-class='["london", "art", "paris"]' class="hello">
                      <img src="images/gallery-image4.jpg" >
                    </li>
                    <li data-filter-class='["london", "sport"]' class="hello">
                      <img src="images/gallery-image5.jpg" >
                    </li>
                    <li data-filter-class='["london", "art", "sport"]' class="hello">
                      <img src="images/gallery-image6.jpg" >
                    </li>
                    <li data-filter-class='["london", "paris"]' class="hello">
                      <img src="images/gallery-image7.jpg" >
                    </li>
                    <li data-filter-class='["london", "art", "paris"]' class="hello">
                      <img src="images/gallery-image8.jpg" >
                    </li>
                    <!-- End of grid blocks -->
                </ul>
            </div>

请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

嗨@ user2339174我是sliphover插件的作者。我不知道我的意思是否得到了你的意思但是几天前我收到了关于滑动github项目issue page的支持请求,他在使用wookmark和sliphover时也遇到了问题,我修复了这个问题。请下载最新版本的sliphover(v1.1.1)并尝试解决问题。