0

Using setHover

asked 2011-01-21 01:39:38 +0800

moloch gravatar image moloch
606 1 13

updated 2011-01-21 01:44:13 +0800

Hello i want to change the mouse arrow to an little hand when i mouse over an image. setHover is not the right method.
please tell me how to do this.. i want the same that happens when i move over an button.

greets

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2011-01-25 04:09:40 +0800

mirkobruzzone gravatar image mirkobruzzone
21 1

I Moloch,
You could insert - style="cursor: hand" - inside the attribute.

Regards
Mirko

link publish delete flag offensive edit

answered 2011-01-25 06:01:53 +0800

moloch gravatar image moloch
606 1 13

hi, how do you mean this?
i tried:

//does not work
img.setAttribute("style", "cursor: hand");

//does not work too
img.setSclass("styleCursorHand");

css
.styleCursorHand {
cursor: pointer;
}

link publish delete flag offensive edit

answered 2011-10-10 12:32:43 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

Same question.

I tried this and it didn't work on Google Chrome:

img.setStyle("cursor: hand;");

link publish delete flag offensive edit

answered 2011-10-11 16:21:22 +0800

twiegand gravatar image twiegand
1807 3

updated 2011-10-11 16:22:52 +0800

Try using pointer instead of hand.  Something like this:

img.setStyle("cursor: pointer;");

Regards,

Todd

link publish delete flag offensive edit

answered 2011-10-11 18:16:15 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

updated 2011-10-11 18:16:30 +0800

I worked around this by using

new Toolbarbutton("", "gfx/image.png");

instead of Image.

link publish delete flag offensive edit

answered 2011-10-11 20:00:00 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

I have tried the following sample, it works fine.

<image src="Animations-24x24.png" style="cursor: pointer;"></image>

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-01-21 01:39:38 +0800

Seen: 1,033 times

Last updated: Oct 11 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More