Change submit button to a loading image with jquery

后端 未结 9 1126
庸人自扰
庸人自扰 2021-02-06 11:12

On a lot of sites lately, I\'ve seen buttons being replaced with loading/thinking images after they are pressed, to prevent double clicks and make sure the user knows something

9条回答
  •  死守一世寂寞
    2021-02-06 11:54

    My way of doing this:

    $(document).ready(function () {
        $('.class_name').click(function () {
            $(this).parent().append('');
            $(this).hide();
        });
    });
    

提交回复
热议问题