cursor css javascript code example

Example 1: style.cursor javascript

<p id="demo" style="cursor:wait;">Mouse over me.</p>
<script>
    parag = document.getElementById("demo");
    alert(parag.style.cursor);
    parag.style.cursor = "crosshair";
    parag.style.cursor = "help";
    parag.style.cursor = "pointer";
}
</script>

Example 2: cursor not pointer

#Element {
	cursor: pointer; /*When you point on this element, cursor will be
  	a pointer.*/
}

#Element {
	cursor: default; /*Will make the cursor not point.*/
}

Example 3: css cursor pointer

body {
  	/*(Cursor image must be 32*32 pixles)*/
	cursor: url(CURSOR_URL), auto;
}

Tags:

Css Example