Body cursors

by secretgspot

HTML

<p><input type="button" value="Wait cursor" id="wait"></p>
<p><input type="button" value="Custom cursor" id="custom"></p>

CSS

html, body {
    height: 100%;
    }

body.wait,
body.wait input {
    cursor: wait;
    }

body.custom,
body.custom input{
    cursor: url(http://static.tumblr.com/qjv9goj/duUlzoulz/ajax-loader.gif), wait;
    }

JavaScript

$(function() {
    $('input').on('click', function(event) {
        var cursor = $(this).attr('id');
        $('body').attr('class', cursor);
    });
});