Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:22:40+00:00 2026-06-12T13:22:40+00:00

In CSS, when you hover your mouse over an element, you can specify views

  • 0

In CSS, when you hover your mouse over an element, you can specify views for it using the :hover pseudo class:

.element_class_name:hover {
    /* stuff here */
}

How can you use jquery to add or “turn on” this pseudo class? Typically in jQuery if you want to add a class you would do:

$(this).addClass("class_name");

I have tried “hover” but this literally adds a class named “hover” to the element.

If anyone knows what to write, please let me know! Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:22:41+00:00Added an answer on June 12, 2026 at 1:22 pm

    You can’t force a certain pseudo-class to apply using jQuery. That’s not how pseudo-classes (especially dynamic pseudo-classes) work, since they’re designed to select based on information that cannot be expressed via the DOM (spec).

    You have to specify another class to use, then add that class using jQuery instead. Something like this:

    .element_class_name:hover, .element_class_name.jqhover {
        /* stuff here */
    }
    
    $(this).addClass("jqhover");
    

    Alternatively you could hunt for the .element_class_name:hover rule and add that class using jQuery itself, without hardcoding it into your stylesheet. It’s the same principle, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using simple pseudo-selector css functionlity. When I hover over my table-cells, they
I have this CSS menu: http://jsfiddle.net/7JC8t/ If you hover your mouse over 'inostranstvo' you
I've got a great effect where you hover your mouse over a particular element
I have a pop-up submenu that when you hover your mouse over the parent
I am trying to make it so that when you hover your mouse over
If you visit http://ngmat.site90.net/ and hover your mouse over the little black box with
Does css hover work on mobile devices? I have a css hover class which
I have css hover over images for my tabs and I'm trying to get
I was wondering how I could set up css pseudo classes, specifically hover so
I'm using the datepicker with icon (little calendar). When I hover over it with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.