Show “loading” animation on button click

前端 未结 6 1007
感情败类
感情败类 2021-01-30 14:10

I want to do something very simple. I have one button in my page.

6条回答
  •  悲&欢浪女
    2021-01-30 14:35

                //do processing
                $(this).attr("label", $(this).text()).text("loading ....").animate({ disabled: true }, 1000, function () {
                    //original event call
                    $.when($(elm).delay(1000).one("click")).done(function () {//processing finalized
                        $(this).text($(this).attr("label")).animate({ disabled: false }, 1000, function () {
                        })
                    });
                });
    

提交回复
热议问题