How to do double-click prevention in JSF

前端 未结 7 1114
生来不讨喜
生来不讨喜 2020-11-29 02:56

We have a few search pages that run against a lot of data and take a while to complete. When a user clicks on the search button, we\'d like to not allow them to submit the s

7条回答
  •  天涯浪人
    2020-11-29 03:40

    Did a simple work with hide and show, works well with element having input type submit Jquery

    $(":submit").click(function (event) {
            // add exception to class skipDisable 
            if (!$(this).hasClass("skipDisable")) {
                $(this).hide();
    			$(this).after("");
            }
        });
         
            

提交回复
热议问题