Hover over a button without changing the cursor

cpliu
cpliu Community Member Posts: 237
How to keep the cursor unchanged (instead of a hand icon) when hovering over a button with action?

Thanks,

Comments

  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
    Add a cascading style sheet via HTML Extension cascading style sheet with the following:

    a#button40MapArea:hover {
    cursor: default!important;
    }

    You will have to change the 40 to whatever number follows button in your project.

    If you are unsure how to make a cascading style sheet - Open any text editor, like notepad, type out the rule as above (substituting your button number - keep everything else) and then before saving the file change the extension from .txt to all files and then name it anything you want with the extension of .css
  • klaatu
    klaatu Community Member Posts: 986 ☆ Roadie ☆
  • jasonadal
    jasonadal Community Member Posts: 450 ♪ Opening Act ♪
    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.