Trigger css3 keyframes using jquery

时光毁灭记忆、已成空白 提交于 2019-12-05 11:30:22

You're adding click events to both add and remove the class to the same button. The net result is that the element will be in an identical state to when it started. Try using to separate buttons to start with.

I found the problem. It was a query conflict problem. I used the following code and it worked.

<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
    jQuery(".commencer").click(function(){
        jQuery("#box").addClass("cubebox");
    });
});

</script>

I recommend you also try this jquery plugin which can dynamically add css3 animations to elements and a bunch of extra stuffs: https://github.com/krazyjakee/jQuery-Keyframes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!