Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
JQuery UI removeClass动画不在站点上运行,但在JSFIDLE中运行_Jquery_Jquery Ui_Jquery Animate_Removeclass - Fatal编程技术网

JQuery UI removeClass动画不在站点上运行,但在JSFIDLE中运行

JQuery UI removeClass动画不在站点上运行,但在JSFIDLE中运行,jquery,jquery-ui,jquery-animate,removeclass,Jquery,Jquery Ui,Jquery Animate,Removeclass,这是你的电话号码 但在网站上它不起作用,有什么想法吗 根据jQuerythis.removeClass'transition',400;的说法,单击其中一个上面有某人姓名的框,例如Scott,它会变为绿色,但当我再次单击时,它会变为红色,并逐渐变回灰色 它在小提琴上工作,但在现场不起作用 代码如下: jQuery(document).ready(function(){ jQuery('.attendance .form .grid_padding label').click(functi

这是你的电话号码

但在网站上它不起作用,有什么想法吗

根据jQuerythis.removeClass'transition',400;的说法,单击其中一个上面有某人姓名的框,例如Scott,它会变为绿色,但当我再次单击时,它会变为红色,并逐渐变回灰色

它在小提琴上工作,但在现场不起作用

代码如下:

jQuery(document).ready(function(){
    jQuery('.attendance .form .grid_padding label').click(function(evt){
        evt.stopPropagation();
        evt.preventDefault();
        if(!jQuery(this).hasClass('attending')){
            jQuery('input', this).prop('checked', true);
            jQuery(this).addClass('attending');
        }else{
            jQuery(this).addClass('transition').removeClass('attending');
            jQuery(this).removeClass('transition',400);
            jQuery('input', this).prop('checked', false);
        }
    });
});

您不包括jquery-ui.js,样式表请包括这些

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.csss">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

正在加载jQuery ui。我还添加了样式表,但它在站点上仍然不起作用。