禁用和启用按钮

时间:2016-12-12 03:56:44

标签: jquery materialize

您好我的课程中使用waves-effect waves-light按钮:

enter image description here

然后,当我点击它时,我禁用,在我将数据保存到服务器后,我再次启用但是有些东西无效,因为按钮保持禁用状态util我再次悬停我可以看到它恢复正常样式。

enter image description here

me.addClass('disabled');
            me.prop('disabled', true);
            me.html('<i class="fa fa-spin fa-spinner" style="width: auto;height: auto; line-height: 1px; margin-right: 10px;"></i>Please wait');

这是我再次启用按钮后的样子:

enter image description here

me.prop('disabled', false);
                    me.removeClass('disabled');

如果我将其悬停,则其样式将重置为正常。我确信这是关于班级waves-effect的事情。

  

有任何线索吗?

0 个答案:

没有答案
相关问题