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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:15:19+00:00 2026-05-27T16:15:19+00:00

Im trying to make this image fade into the one below it using a

  • 0

Im trying to make this image fade into the one below it using a jQuery animation and then have the webpage load about 2 seconds after the fade. How do set a timer for the second function to load? Here is my code:

<html>                                                          
<head>                                                                  
<script src="http://code.jquery.com/jquery-latest.js"></script>
<style type="text/css">
.fade
{
z-index:1;}
.abs
{position:absolute;
    z-index: 10;}
</style>
</head>
<body>
    <div id="fadephoto">

    <div id="f4d" class="abs">
    <img  src="1.jpg" >

    </div>
<div class="fade">  <img src="4.jpg" /></div>
</div>

</body>  

<script>
{var fadeClicked = false;}
$("#f4d").click(function () {
$(this).fadeTo(2000, 0.01)
fadeClicked = true;
});

$('#fadephoto').click(function()
{
    if (fadeClicked)
    {
        window.location.href = ('http://www.ifdvidfji.com');
    }
});

</script>
  • 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-27T16:15:19+00:00Added an answer on May 27, 2026 at 4:15 pm

    You can use settimeout. Because you don’t want to repeat code you can trigger the click event on your manual bypass.

    http://jsfiddle.net/3nKDD/

    $("#f4d").click(function() {
        $(this).fadeTo(2000, 0.01)
        fadeClicked = true;
        setTimeout(function() { $('#fadephoto').trigger('click'); }, 2200);
    });
    

    Although I would restructure your javascript because right now clicking triggers both handlers and I think you only want it to trigger one of them.

    http://jsfiddle.net/3nKDD/2/

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

Sidebar

Related Questions

I have been trying to make this to be a little jQuery plugin that
I am trying to make two ajax requests in parallel using jQuery like this:
I have a problem with jQuery. I am trying to make an image appear(or
I'm trying to make this: <span class=introduction> <img alt=image src=/picture.jpg /> </span> transform into
im trying to make Categories and Subcategories, im checking this models but i have
I'm trying to make an image fade in/out when the user hovers over the
I'm having headaches trying to make this work: I have a <a> element with
I'm trying to make an application that cuts image into jigsaw puzzles. My problem
I have spent days trying to make this work based on the examples in
I am trying to make an Image Viewer using SWT where I want to

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.