Is there any way to do this to let the user know the element is clickable?
I have been using easeljs but haven't found anything related.
HTML cursor property works based on style property within HTML tag. We will investigate some different cursor syntax in HTML. How Cursor Look Like? Based on the text cursor will change automatically. By default, an arrow cursor. No cursor is displayed. Help information with an arrow question mark.
How to Change the Cursor of Hyperlink while Hovering ¶ The default cursor for a hyperlink is "pointer". To change it, you need to specify the cursor type for your <a> element with the CSS :hover selector. In our example, we style only the "link" class.
But if you want to have a hand pointer for all of your list items, just set the style for the <li> element. Now let’s see an example of changing a mouse pointer into a hand pointer by using the "pointer" value of the cursor property. We set that cursor type only on the "pointer" class.
Watch a video course CSS - The Complete Guide (incl. Flexbox, Grid & Sass) To add a text on hover, you’ll need to use the title attribute. In this snippet, we'll use it on the <div>, <span>, <abbr>, and <p> elements. Hover this text to see the result.
You could use this: How to make clickable points in html5 canvas?
and while the mouse is in that area, you can set: $('#canvasID').css('cursor','pointer')
and $('#canvasID').css('cursor','auto')
when it's not over it.
I am using Easeljs and to get a pointer cursor I use myObject.cursor = 'pointer'
and stage.enableMouseOver(20);
( from the DragAndDrop.html example code )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With