Changing cursor to waiting in javascript/jquery

后端 未结 13 2075
孤街浪徒
孤街浪徒 2020-12-04 10:43

\"enter

How would i get my cursor to change to this loading icon when a function is ca

13条回答
  •  执念已碎
    2020-12-04 11:24

    Using jquery and css :

    $("#element").click(function(){ 
        $(this).addClass("wait");
    });​
    

    HTML:

    Click and wait

    CSS: .wait {cursor:wait}​

    Demo here

提交回复
热议问题