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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:56:25+00:00 2026-05-26T23:56:25+00:00

If you see this JSFiddle here , I’m simply trying to animate in a

  • 0

If you see this JSFiddle here, I’m simply trying to animate in a button/link, albeit in a certain way. I want the link to still apply in layout so that the layout doesn’t change at all.

My HTML:

<p>
    <a id="helloWorld" href="#" class="btn primary large">Hello, World! &raquo;</a>
    Fork this to get hacking on <span class="label stark">Bootstrap</span> and <span class="label stark">jQuery</span>.
</p>

My CSS:

#helloWorld { 
     visibility: hidden;
} 

My jQuery:

$("#helloWorld")
    .delay(1000) // after a second
    .css("visibility", "visible") // make it 'visible
    .hide() // but hide it 
    .fadeIn(500); // then fade it in

I have to do the visibility:visible then hide() hack as noted here. The weird thing is that if I disable my JavaScript altogether, the link takes up the space normally. If I enable the JavaScript, then the layout gets all messed up. It appears that for some reason, it’s executing the css() and the hide() before the delay is over! What am I doing wrong?

  • 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-26T23:56:25+00:00Added an answer on May 26, 2026 at 11:56 pm

    The reason your code does not work is because .delay() does not work the same as javascript’s setTimeout. Check out http://api.jquery.com/delay/ for more documentation on that.

    Try this fix:

    setTimeout(function() {
      $("#helloWorld").css("visibility", "visible").hide().fadeIn(500);
    }, 1000);
    

    Here is the jsfiddle: http://jsfiddle.net/7LGrS/2/

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

Sidebar

Related Questions

You can see the example here: http://jsfiddle.net/8EHED/8/ This is a tricky problem because I
I see this question has been asked before, but I still trying to get
This question was asked here but the issue wasn't resolved. Please see this jsfiddle
This question is related to this question yesterday . Please see current jsfiddle here
http://jsfiddle.net/YaMhn/8/ ^^^^Take a look and see if you can help solve this Ok so
This is my code: http://jsfiddle.net/WCP5f/2/ If you open it with Chrome, you will see
I'm running this code in Firefox 11 on Windows 7. (See http://jsfiddle.net/QStkd/ ). $('<div><input
I got a CSS question related to this fiddle: http://jsfiddle.net/r584e/ Here the relevant screenshot
Ok, if you go here: http://jsfiddle.net/RarFB/2/ You will see the work that I have
Please see this jsFiddle for reference: (jsFiddle) Div Resizing [to see what I'm having

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.