【问题标题】:semantic ui transition works on chrome but not on firefox语义 ui 过渡适用于 chrome,但不适用于 Firefox
【发布时间】:2016-01-10 19:28:03
【问题描述】:

我正在使用语义 ui 构建一个网站,有一个 html 类,我称之为内容,当它在屏幕上可见时我想抖动它,我使用 jQuery“inview event plugin”,它在 chrome 上完美运行,但是不在firefox上,html代码是

<div class="column">
    <h1><i class="icon circular square yellow inverted">JS</i></h1>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, .</p>
    <div class="ui fade reveal pop" data-content="javascript and jQuery" data-title="JS">
    <img src="images/js.png" alt="js" class="ui circular image visible content" />
    <img src="images/jsreveal.png" alt="js" class="ui circular image hidden content">
    </div>
</div>  

jQuery 代码是:

$('.content').bind('inview', function (event, visible) {
if (visible == true) {

 $('.pop .content').transition({
animation: 'jiggle',
duration: 1000,
useFailSafe: true,
allowRepeats: false,
queue : false
        });

} });

提前致谢

【问题讨论】:

    标签: jquery html firefox semantic-ui


    【解决方案1】:

    我能够在两种浏览器上实现所需的抖动动画功能 - Chrome 和 Firefox 以及点击事件处理程序。看来 inview 处理程序的绑定在这里不正确。 参考http://jsfiddle.net/vaibhav_saxena/30qfv5km/

    $('.content').on('click', function () {
        $('.content').transition({
            animation: 'jiggle',
            duration: 500,
            useFailSafe: true,
            allowRepeats: false,
            queue : false
        });
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-12-13
      • 2018-09-08
      • 2014-11-17
      • 2015-06-09
      • 2011-08-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多