I'm making links out of divs (because I don't actually want the page to go anywhere, I just want an onMouseDown event) and the cursor property seems to work fine in IE, but it is not working in firefox. this seems like a quick fix.. any suggestions?hand is an IE only value for the cursor property.
Use cursorointer
<!-- m --><a class="postlink" href="http://www.free-scripts.net/html_tutorial/css/properties/dynamic/cursor.htmthanks">http://www.free-scripts.net/html_tutori ... .htmthanks</a><!-- m --> And when cursorointer; doesn't work (i.e., it displays the same as cursor:default in Firefox ... then what?In fact, I'm getting the same result in Firefox 1.0.7 -- i.e., cursor:default, cursorointer, and cursor:move (all I tried) all display the exact same mouse cursor shape (an arrow) in Firefox. So, what is the solution?works for me (FF 1.0.6)
<!-- m --><a class="postlink" href="http://www.w3schools.com/css/pr_class_cursor.asp">http://www.w3schools.com/css/pr_class_cursor.asp</a><!-- m -->
Are you sure you made no error in your syntax, or typos?Show me my error:
function placeCoins(idx, cnt) {
if (--cnt < 1) {
if (--idx < 0) return;
cnt = availablecoins[current_level][idx]
if (cnt == 0) {
window.setTimeout("placeCoins("+idx+",0)", 0);
return;
}
}
var x = Math.round(Math.random() * (purseWidth - coinPad - 1) + purseLeft);
var y = Math.round(Math.random() * (purseHeight - coinPad - 1) + purseTop);
var img = document.createElement("IMG");
img.setAttribute("className", "coins", 0);
img.setAttribute("src", coinimages[idx], 0);
img.setAttribute("alt", coinnames[idx], 0);
img.setAttribute("title", coinnames[idx], 0);
if (img.style.setAttribute) {
img.style.setAttribute("position", "absolute", 0);
img.style.setAttribute("left", x+"px", 0);
img.style.setAttribute("top", y+"px", 0);
img.style.setAttribute("z-index", "2", 0);
} else {
var txt = coinhtml.replace(/%3%/, x).replace(/%4%/, y);
img.setAttribute("style", txt, 0);
}
img = purse.appendChild(img);
if (window.Event) {
img.onmousedown = function(event) { return setDrag(this, event); };
img.onmousemove = function(event) { return resetMove(event); };
img.onmouseup = function(event) { return endDrag(event); };
} else {
img.onmousedown = function() { return setDrag(this, event); };
img.onmousemove = function() { return resetMove(event); };
img.onmouseup = function() { return endDrag(event); };
}
window.setTimeout("placeCoins("+idx+","+cnt+")", 100);
}
Use cursorointer
<!-- m --><a class="postlink" href="http://www.free-scripts.net/html_tutorial/css/properties/dynamic/cursor.htmthanks">http://www.free-scripts.net/html_tutori ... .htmthanks</a><!-- m --> And when cursorointer; doesn't work (i.e., it displays the same as cursor:default in Firefox ... then what?In fact, I'm getting the same result in Firefox 1.0.7 -- i.e., cursor:default, cursorointer, and cursor:move (all I tried) all display the exact same mouse cursor shape (an arrow) in Firefox. So, what is the solution?works for me (FF 1.0.6)
<!-- m --><a class="postlink" href="http://www.w3schools.com/css/pr_class_cursor.asp">http://www.w3schools.com/css/pr_class_cursor.asp</a><!-- m -->
Are you sure you made no error in your syntax, or typos?Show me my error:
function placeCoins(idx, cnt) {
if (--cnt < 1) {
if (--idx < 0) return;
cnt = availablecoins[current_level][idx]
if (cnt == 0) {
window.setTimeout("placeCoins("+idx+",0)", 0);
return;
}
}
var x = Math.round(Math.random() * (purseWidth - coinPad - 1) + purseLeft);
var y = Math.round(Math.random() * (purseHeight - coinPad - 1) + purseTop);
var img = document.createElement("IMG");
img.setAttribute("className", "coins", 0);
img.setAttribute("src", coinimages[idx], 0);
img.setAttribute("alt", coinnames[idx], 0);
img.setAttribute("title", coinnames[idx], 0);
if (img.style.setAttribute) {
img.style.setAttribute("position", "absolute", 0);
img.style.setAttribute("left", x+"px", 0);
img.style.setAttribute("top", y+"px", 0);
img.style.setAttribute("z-index", "2", 0);
} else {
var txt = coinhtml.replace(/%3%/, x).replace(/%4%/, y);
img.setAttribute("style", txt, 0);
}
img = purse.appendChild(img);
if (window.Event) {
img.onmousedown = function(event) { return setDrag(this, event); };
img.onmousemove = function(event) { return resetMove(event); };
img.onmouseup = function(event) { return endDrag(event); };
} else {
img.onmousedown = function() { return setDrag(this, event); };
img.onmousemove = function() { return resetMove(event); };
img.onmouseup = function() { return endDrag(event); };
}
window.setTimeout("placeCoins("+idx+","+cnt+")", 100);
}