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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:15:18+00:00 2026-06-19T04:15:18+00:00

I have a hover function (see code below) that gives a drop down paragraph

  • 0

I have a hover function (see code below) that gives a drop down paragraph of text on the class I’ve applied it to. This is working fine on the class specified.

$('.job_container').hover(function(){
   $(".job_subheading").animate({top: "30px }, 200);},
      function(){
            $(".job_subheading").animate({
        top: "0px" }, 200);
      });

However I would like to add more of instances of these classes with different drop down paragraphs. When I do and then hover over one, the drop down is applied to all because they have the same class.

Should I change the classes to ids and re-write the code for every instance I wish to use?
Whats the neatest way to apply the code in multiple instances?

Thanks for your help,
Gavin

  • 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-19T04:15:20+00:00Added an answer on June 19, 2026 at 4:15 am

    You should use the children selector:

    $('.job_container').hover(function(){
    $(this).children(".job_subheading").animate({
    top: "30px }, 200);},
                          function(){
    $(this).children(".job_subheading").animate({
    top: "0px" }, 200);
    

    So, your html must be like this:

    <div class="job_container"><div class="job_subheading"></div>something else</div>
    <div class="job_container"><div class="job_subheading"></div>something else</div>
    <div class="job_container"><div class="job_subheading"></div>something else</div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a chunk of code like this: .hover( function () { hoverState($(#navbar
I have the following code: $(document).ready(function(){ $(.yearInner).hide(); $(.year, this).hover( function () { $(.yearInner, this).slideToggle();
I have this code somewhere in my plugin: $('tr', $this).hover(function(){ var cur_color = null;
I have the following code example (see below). My problem is that the tooltip
I have this jquery code. //this is the main javascript $(document).ready(function(){ $('nav.menu a').hover( function
All, See the code below: function menu() { this.menuitem=[]; this.submenu=[]; this.menuitem[0] = $('div#sivname1'); this.menuitem[1]
I have some hover() JS code: $( '.leftMenuProductWrapper').hover ( function () { }, function
I have the following jQuery: $(#toolbar).hover(function () { $(.logo).fadeOut(slow, function () { $(this).addClass(logohover) $(this).parent().addClass(logohover).fadeIn(slow,
I have the following JQuery: $(document).ready(function () { $('tr').hover(function () { $(this).children().addClass(color2); $(this).children().removeClass(color1); });
$(.container).hover( function(){ $(.child-1).hide(0); $(.child-2).show(0); },function(){ $(.child-1).show(0); $(.child-2).hide(0); }); A project I have requires that

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.