Adding a hand and pointer CSS style dynamically to an Element
158 views
Skip to first unread message
Jason Sapp
unread,
May 22, 2013, 3:36:22 PM5/22/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mi...@dartlang.org
I have a newbee question about how to add two CSS styles to a DOM Element with the same name. This is a bad example, but lets say that I wanted to add ('cursor=hand; cursor=pointer' styles to a particular element).
I've tried:
----------------
elem.style.cursor = "pointer"; // Obviously works
----------------
elem.style.cursor = "hand"; // Doesn't work
----------------
elem.style.cursor = "hand; cursor"; // Doesn't work
Thanks,
Jason
Seth Ladd
unread,
May 22, 2013, 8:00:28 PM5/22/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to General Dart Discussion
Hi Jason,
Many CSS properties expect a single value. You can set multiple classes on an element, which is a common practice. Can you be more specific, and we'll try to help more.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mi...@dartlang.org
On Thursday, May 23, 2013 5:28:13 AM UTC-3, Jos Hirth wrote:
There is no "hand" cursor.
This is probably one of the most important issues you were running into with your code. Check out this site for a brief rundown of cursor types and a demo in which you can easily see them all.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mi...@dartlang.org
Thanks Jos and Matthew. I knew that hand is no longer used (since I think IE 5). I was just curious if there was a way to support multiple values of the same CSS style. But, at the end of the day, I really don't think it's needed because (as Seth mentioned), you can implement this functionality just fine with CSS classes.....