Paweł Bąkiewicz
Paweł Bąkiewicz

Reputation: 207

Raphael button with label

I made a button with text using jquery plugin Raphael and everything would be fine apart from that when user hover over text - cursor changes and he cannot click the button anymore!

Like : http://jsfiddle.net/sidonaldson/qcXHu/

var buttonText = rsr.text(140, 60, "BUTTON1")

So how can I 'blend' text with button so that text is still on top but user cannot actually hover over it ?

Upvotes: 0

Views: 93

Answers (1)

Robert Longson
Robert Longson

Reputation: 124089

Add

buttonText.node.setAttribute("pointer-events", "none");

and similar for the circleText. This will make the text ignore (or pass-through) mouse events to the element below (the button).

Upvotes: 1

Related Questions