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

  • Home
  • SEARCH
  • 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 839579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:29:12+00:00 2026-05-15T05:29:12+00:00

<script type=text/javascript> $(document).ready(function() { $(.module .caption).hide(); $(.module).hover(function() { $(this).find(.caption).slideDown().end().siblings(‘.module’).addClass(‘under’); },function() { $(this).find(.caption).slideUp().end().siblings(‘.module’).removeClass(‘under’).delay(10000); }); });

  • 0
<script type="text/javascript">
 $(document).ready(function() {
  $(".module .caption").hide();
  $(".module").hover(function() {
     $(this).find(".caption").slideDown().end().siblings('.module').addClass('under');
   },function() {
     $(this).find(".caption").slideUp().end().siblings('.module').removeClass('under').delay(10000);   
   });
 });
</script>

This works great, except the .delay doesn’t work, is my syntax wrong? I’m just trying to accomplish haveing the .removeClass(“under”) delayed by a second or two when the mouse un-hovers. I don’t want to delay the slideUp.

Any ideas?

  • 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-05-15T05:29:13+00:00Added an answer on May 15, 2026 at 5:29 am

    delay() works on the fx queue by default. removeClass does not get added to any queues, so cannot be affected by delay() without some changes.

    You can either:

    1. Add the removeClass call to the fx queue manually
    2. Use setTimeout instead.

    Solution 1 Note the reshuffling of delay in the jQuery chain as well!:

    $(this).find(".caption").slideUp().end().siblings('.module').delay(1000).queue(function () {
        $(this).removeClass('under').dequeue(); // dequeue is IMPORTANT!
    });
    

    Solution 2:

      $(".module").hover(function() {
         $(this).find(".caption").slideDown().end().siblings('.module').addClass('under');
       },function() {
         var self = $(this).find(".caption").slideUp().end().siblings('.module');
    
         setTimeout(function () {
            self.removeClass('under');
         }, 1000);   
       });
    

    Note that both solutions will give weird (but different) effects if someone mouse overs/ outs a few times. To solve the issues with #1, add .stop().clearQueue() to the chain on mouse over. To solve #2, store a reference to the timeout, and clearTimeout(theVariable) on mouse over.

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

Sidebar

Ask A Question

Stats

  • Questions 488k
  • Answers 488k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can prevent the event from bubbling using event.stopPropgation() like… May 16, 2026 at 8:47 am
  • Editorial Team
    Editorial Team added an answer Doesn't look like you're calling session_start(). Make sure you call… May 16, 2026 at 8:47 am
  • Editorial Team
    Editorial Team added an answer Perhaps you can shift the date to test against instead:… May 16, 2026 at 8:47 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Here is function , <script type=text/javascript> $(document).ready(function() { getRecordspage(1, 5); $(a.page-numbers).click(function() { alert(1); getRecordspage($(this).text(),
I have the following and in this order: <script type=text/javascript> $(document).ready(function(){ var overwrite =
Is this a valid url parameter in jquery.ajax(), <script type=text/javascript> $(document).ready(function() { getRecordspage(); });
I cannot seem to make this simple code work: <script type=text/javascript> $(document).ready(function(){ $.getJSON('http://maps.google.com/maps/api/geocode/json?address=cebu&sensor=false&region=ph', function(results)
<script type=text/javascript> $(document).ready(function(){ function listadepoimentos(page){ // $.get(ajaxes.php, {act:'listadepoimentos', page:page}, function a(b){$('#holder').html(b)}, text); $.ajax({ type:
In view page: <script languge=javascript type=text/javascript> $(document).ready(function() { $('#delete').click(function(e) {; e.preventDefault(); var parent =
I have the following code that works: <script type=text/javascript> $(document).ready(function() { // Initialise the
I have the following code that works: <script type=text/javascript> $(document).ready(function() { // Initialise the
I'm attempting to select all <script type=text/html> tags in a page. I use <script>
<form id=form1 method = post> Text1:<input type =text id=textname1/><br> <input type =button name=button2 id=button2

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.