Jump to content

[SOLVED] Alternative to a:hover?


random1

Recommended Posts

I read that using 'a:hover' is bad practice in CSS and that it is recommended that you use a snippet of Javascript to achieve the hover affect.

 

The reason that they gave is that the ':hover' part causes the DOM to load slowly.

 

Is this right? Any better version in CSS to have the same effect for a simple #navmenu element?

Link to comment
Share on other sites

Whoever said that didn't really know what they were talking about:

 

a) I've never noticed it to place that much of a load on the DOM

b) Using javascript requires that the user has javascript turned on, and the javascript itself is more likely to be much heavier on your processing power than the :hover element.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.