How would i get my cursor to change to this loading icon when a function is called and how would i change it back to a normal cursor in javascript/jquery
<div style="cursor: pointer" onmousedown="$('html').addClass('wait');" onclick="sample('DE');">sample</div>
<script>
function sample(c) {
//timeout (this waits 50ms after function completed to restore cursor)
setTimeout(function() { $('html').removeClass('wait') }, 50);
//do your stuff including a calling opening a modal window
//call ajax etc,
}
</script>