Description text to appear by cursor pointer

Probably this is easy, but I cannot get it work:

Using the following title attribute, I can display a description text on the defined clickable area:

$("#myElement").attr('title', ‘description text’);

Is it possible to do the above but instead of the title attribute to use the “finger” cursor?

Maybe like as follows:



I don’t understand what the title and cursor have to do with each other, but you can change styles in jQuery using:

$("myElement").css('cursor', 'pointer')

Note that there is an important difference between HTML attributes and styles. title is an attribute and is changed via .attr.

Leave a Reply

Your email address will not be published. Required fields are marked *