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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:50:45+00:00 2026-05-31T01:50:45+00:00

I am creating a slideshow using jquery based on the code given here –

  • 0

I am creating a slideshow using jquery based on the code given here – http://snook.ca/archives/javascript/simplest-jquery-slideshow

This is the sample code:

<html>
<head>
<style>
.fadein { position:relative; width:500px; height:332px; }
.fadein img { position:absolute; left:0; top:0; }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
    $('.fadein img:gt(0)').hide();
    setInterval(function(){
      $('.fadein :first-child').fadeOut()
         .next('img').fadeIn()
         .end().appendTo('.fadein');}, 
      3000);
});



</script>
</head>
<body>
<div class="fadein">
  <img src="http://farm3.static.flickr.com/2610/4148988872_990b6da667.jpg">
  <img src="http://farm3.static.flickr.com/2597/4121218611_040cd7b3f2.jpg">
  <img src="http://farm3.static.flickr.com/2531/4121218751_ac8bf49d5d.jpg">
</div>
<a href="#"><img id="try" src="http://freeimagesarchive.com/data/media/29/12_sky.jpg" /></a>
</body>
</html>

What I want is, when I hover over the image with the id try, the slideshow should get hidden for a certain duration and show a static image instead and regains the slideshow after few moments..I am pretty novice in jquery, can someone help me out in this??
Thanx..

  • 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-31T01:50:47+00:00Added an answer on May 31, 2026 at 1:50 am

    If i understood your requirement correctly,

    this fiddle has the solution.

    I just added two event listeners(mousenter, mouseleave) for image element try and used 2 variables to keep track of hover state & slide show image source.

    var tryHovered = false;
    var actualSrc = '';
    $('.fadein img:gt(0)').hide();
    setInterval(function() {
    if(!tryHovered){
        $('.fadein :first-child').fadeOut().next('img').fadeIn().end().appendTo('.fadein');
    }
    }, 3000);
    
    
    
    $('#try').mouseenter(function(e) {
         tryHovered = true;
         actualSrc = $('.fadein :first-child').attr('src');
        $('.fadein :first-child').attr('src', this.src);//Replace this.src with any other static image path that you want to display.
    }).mouseleave(function(e) {
         tryHovered = false;
         $('.fadein :first-child').attr('src', actualSrc);
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a slideshow using javascript that fades images. Awhile back, I discovered that
I've got a simple slideshow I'm creating using jQuery for a Peruvian client at
(creating a separate question after comments on this: Javascript redeclared global variable overrides old
I am creating a slideshow of animations using animated GIFs. I'm crossfading from one
This is keeping me sleepless... I'm creating a slideshow kind of app. Let's say
Creating a table without tbody using javascript createElement/appendChild will not add tbody in Firebug
Ok, so I am creating a slideshow presentation in Flash CS5. The code is
I am creating a JavaScript class called ImageRotatorManager to manage a dynamically-loaded slideshow. When
I am creating this custom theme www.designislikethis.tumblr.com , which uses the jQuery Masonry and
Creating a slideshow jQuery plugin, but having trouble getting it to work with more

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.