Seems to work just like that here - though only on the body element. If you want to do that for every element, there are various ways. I'd prefer using jQuery, let me know if that's available. But without that, this should work (place just before the closing </body> tag near the end of the page):
Code:
<script type="text/javascript">
(function(){
var cn = document.body.className, nc = "nocursor", re = /\bnocursor\b/;
while (re.test(cn)){
nc += new Date().getTime();
re = new RegExp('\\b' + nc + '\\b');
}
document.write('<style type="text/css">' +
'body.' + nc + ', body.' + nc + ' * {' +
'cursor: none !important;' +
'}' +
'</style>');
document.body.className = cn? cn + ' ' + nc : nc;
setTimeout(function (){
cn = document.body.className.replace(re, '');
if(cn){
document.body.className = cn;
} else {
document.body.removeAttribute('className');
document.body.removeAttribute('class');
}
}, 10000); // How long do you want the delay to be (in milliseconds)?
})();
</script>
Bookmarks