Is it possible to get when any button has the mouse hovering over it?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CatastrophicDInosaur

I want to make it so when I hover over a button it’ll grab focus. I could go around connecting the functions to all the buttons but I have a LOT of buttons so this would be way too time consuming.

:bust_in_silhouette: Reply From: Yoglica

just you can use some common class name for all the buttons and write css for it on hover. It will work.
if you are using bootstrap then it uses class like “btn btn-primary” when you hover it applies that class and got a small hover effect also.

.btn:hover {
//your style

add .btn to all your buttons