Explore the community Forums Lectora Lectora Questions & Answers Hover over a button without changing the cursor Reply To: Hover over a button without changing the cursor

#372895 Score: 0
Profile photo of Jason Dalrymple
Jason Dalrymple
Member
beginner
intermediate
profile
wise owl
curious george
contributor
friend finder
advanced
picture perfect
54 pts
@JasonADal

I’ve used a similar option where you don’t need to change the value in the JS each time. On the button, add an onHover action that performs a RunJavascript:

document.getElementById(“%HTMLNAME%btn”).style.cursor=”default”;

The “%HTMLNAME” will grab the value that you’d see in the button description from the Properties ribbon. You need to add the “btn” since that is the name of the object in the HTML for the page. I actually created a library object so I can just add through double-click/drag drop.

@klaatu – Any particular reason the JS might be better than the solution I’m using? One benefit I would see to mine is that it’s easily translatable into CSS and I could apply it to different buttons without having to add the JS to each button I want a “default” cursor.

Edit: oops, your solution is better, since you have it in a CSS file. I should look more closely (or drink more coffee) before responding to forum posts.