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 8009761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:32:18+00:00 2026-06-04T18:32:18+00:00

is it possible in jquery to animate general tags like a or div to

  • 0

is it possible in jquery to animate general tags like a or div to their corresponding hover styles without declaring a different classes for each tag/class?

For example a has a:hover in CSS standards, can I let Jquery tell to animate to that style instead of creating two different customs classes?

  • 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-04T18:32:20+00:00Added an answer on June 4, 2026 at 6:32 pm

    No, you cannot force an element to be styled as one of its pseudo-classes. These can only be applied by the browser itself.

    Generally, you’d define your hover styles for both :hover and .hover so you can still apply the hover style with addClass('hover').

    a:hover, a.hover {
         // Fancy styling goes here
    }
    

    If your hierarchy goes deeper, you’ll end up writing those two selectors quite a lot. Unfortunately, it’s the only way (I know) to do this.

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

Sidebar

Related Questions

using jQuery it is possible to do something like this: $(div)[5].animate() This seems to
is it possible to animate the background colour of an element in jquery without
Possible Duplicate: jQuery: how do I animate a div rotation? I have a div
Possible Duplicate: jQuery UI draggable to smaller droppable I have a draggable div and
Possible Duplicate: jQuery event to trigger action when a div is made visible How
Possible Duplicate: jQuery animate backgroundColor Is it possible to animate/transition the background-color of a
I would like to write a jQuery plugin to animate a background-size property from
is it possible to use a PHP variable for Jquery animate. For example would
I am wondering if it is possible to animate background url using jQuery, and
I'm just learning jQuery, figuring out what's possible, finding my way around. I'd like

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.