View Full Version : Firefox cursors
I don't know how Javascriptie this question is, but in firefox, when I set a cursor on the body, it only changes when you have your mouse over content in the body, not a blank space. I tried putting an image over, but then you can't select text. How might I do this?
jscheuer1
08-20-2007, 05:19 PM
<style type="text/css">
html, html * {
cursor:help!important;
}
html {
height:100%;
}
</style>
If you want other styles to be able to change the cursor in certain cases, don't use '!important'.
Ok, thanks. But how would you do that in Javascript?
document.getElementsByTagName ("html") [0].style
?
jscheuer1
08-20-2007, 05:31 PM
Something like:
<script type="text/javascript">
function curses (){
var els=document.getElementsByTagName('*'), htm=document.getElementsByTagName('html')[0];
for (var i = 0; i < els.length; i++)
els[i].style.cursor='help!important';
htm.style.height='100%';
}
onload=curses;
</script>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.