English 中文(简体)
- Webkit - 过渡时期的变换和杂交
原标题:Change -webkit-transition-delay with jquery

我现在正设置我的延迟时间:

.isotope .isotope-item {
    -webkit-transition-property: left, top, opacity;
    -moz-transition-property: left, top, opacity;
    -ms-transition-property: left, top, opacity;
    -o-transition-property: left, top, opacity;
    transition-property: left, top, opacity;
    -webkit-transition-delay: 0s, 0.8s, 0s;
    -moz-transition-delay: 0s, 0.8s, 0s;
    -ms-transition-delay: 0s, 0.8s, 0s;
    -o-transition-delay: 0s, 0.8s, 0s;
    transition-delay: 0s, 0.8s, 0s;
}

我在jQuery有一个有条件的声明 需要能够改变我的延迟 像这样:

.isotope .isotope-item {
    -webkit-transition-delay: 2s, 0.8s, 0s;
    -moz-transition-delay: 2s, 0.8s, 0s;
    -ms-transition-delay: 2s, 0.8s, 0s;
    -o-transition-delay: 2s, 0.8s, 0s;
    transition-delay: 2s, 0.8s, 0s;
}

如果能够实现这一点,有什么想法,或解决该问题的任何其他解决办法吗?

最佳回答

在您的条件中,在需要较长延迟的元素中添加另一个类,例如 foo ,然后将您的第二个样式修改为 :

.isotope .isotope-item.foo {
    -webkit-transition-delay: 2s, 0.8s, 0s;
    -moz-transition-delay: 2s, 0.8s, 0s;
    -ms-transition-delay: 2s, 0.8s, 0s;
    -o-transition-delay: 2s, 0.8s, 0s;
    transition-delay: 2s, 0.8s, 0s;
}

更具体一点将确保这些要素的延迟时间更长。

问题回答

j Query 可以处理供应商的预设件, 仅此而已 。

$(".isotope-item").css( -webkit-transition-delay ,  2s, 0.8s, 0s  )
   .css( -moz-transition-delay ,  2s, 0.8s, 0s )
   .css( -ms-transition-delay ,  2s, 0.8s, 0s )
   .css( -o-transition-delay ,  2s, 0.8s, 0s )
   .css( transition-delay ,  2s, 0.8s, 0s );

如果您不想按照 Rory 的建议添加一个新类, 将会工作 。

http://jsfiddle.net/qzuDr/





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签