JQuery UI removeClass动画不在站点上运行,但在JSFIDLE中运行
这是你的电话号码 但在网站上它不起作用,有什么想法吗 根据jQuerythis.removeClass'transition',400;的说法,单击其中一个上面有某人姓名的框,例如Scott,它会变为绿色,但当我再次单击时,它会变为红色,并逐渐变回灰色 它在小提琴上工作,但在现场不起作用 代码如下: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
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。我还添加了样式表,但它在站点上仍然不起作用。