views:

27

answers:

1

I need to do this:

document.styleSheets[i].rules[1].style.cssText = "cursor: url(images/grabbing.cur), default !important;";

and if I'm checking:

alert(document.styleSheets[i].rules[1].style.cssText);

its giving: cursor: !important

Why is it not setting the whole string in this css?

It's a problem in Internet Explorer only, it works in Firefox.

A: 

A simple tipo: there is no ", default" needed.

in css the character "," just uses to seperate items in a list like:

font-family: tahoma, times;

and the cursor property does not accept a serie as value.

the correct form for your css:

cursor: url(images/grabbing.cur) !important;

feather reading: http://www.w3schools.com/css/pr_class_cursor.asp

takpar
Hey it doesnt work alsoi tried thisdocument.styleSheets[i].rules[1].style.cssText = "cursor: url(images/grabbing.cur) !important;";alert(document.styleSheets[i].rules[1].style.cssText);its giving the same"cursor: !important" value by alert.