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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:52:47+00:00 2026-05-13T20:52:47+00:00

I am using one of snook.ca script for simple slideshow. Here it is in

  • 0

I am using one of snook.ca script for simple slideshow. Here it is in a nutshell:

<div class="fadein">
    <img src="banner1.jpg" width="645" height="307"/>
    <img src="banner2.jpg" width="645" height="307"/>
    <img src="banner3.jpg" width="645" height="307"/>
</div>
<script>
    $(function(){
        $('.fadein img:gt(0)').hide();
    setInterval(function(){$('.fadein :first-child').fadeOut().next('img').fadeIn().end().appendTo('.fadein');}, 4000);
});
</script>

Now I have tried to make these images clickable at while in slideshow. So my markup will be something like:

<div class="fadein">
    <a href="yahoo.com"><img src="banner1.jpg" bwidth="645" height="307"/></a>
    <a href="google.com"><img src="banner2.jpg" width="645" height="307"/></a>
    <a href="live.com"><img src="banner3.jpg" width="645" height="307"/></a>
</div>

How do I achieve this functionality without making the script too complicated. Please note that <img/> tags are provided to me and I have no control over it.

  • 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-13T20:52:47+00:00Added an answer on May 13, 2026 at 8:52 pm

    Working from CrazyJugglerDrummer‘s try, you’d want to hide and then cycle the as, not the imgs. Otherwise you’ll be looking for next('img') where it doesn’t exist.

    update Seems like it’s a mix of CSS and js. I have it working now, like so:

    <div class="fadein">
      <a href="yahoo.com"><img src="banner1.jpg" width="645" height="307"/></a>
      <a href="google.com"><img src="banner2.jpg" width="645" height="307"/></a>
      <a href="live.com"><img src="banner3.jpg" width="645" height="307"/></a>
    </div>
    <script>
    $(function(){
        $('.fadein a:gt(0)').hide();
    setInterval(function(){$('.fadein a:first-child').fadeOut().next('a').fadeIn().end().appendTo('.fadein');}, 4000);
    });
    </script>
    

    with CSS

    .fadein { position:relative; width:645px; height:307px; }
    .fadein a { position:absolute; left:0; top:0; display:block; text-decoration:none; }
    img { border:0; display:block; }
    

    You have to make sure your anchors and images are displayed block, and that the absolute position is set on your anchor. Also you need to further specify the :first-child so as not to fade the image.

    further update Using 1.3.2 jQuery and XHTML Strict. Works in FF, IE6 – 8, Safari, Chrome, and Opera.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    <head>
    <style type="text/css">
      .fadein { position:relative; width:645px; height:307px; }
      .fadein a { position:absolute; left:0; top:0; display:block; text-decoration:none; }
      img { border:0; display:block; }
    </style>
    <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
    <script>
    $(document).ready(function(){
      $('.fadein a:gt(0)').hide();
      setInterval(function(){$('.fadein a:first-child').fadeOut().next('a').fadeIn().end().appendTo('.fadein');}, 4000);
    });
    </script>
    </head>
    <body>
      <div class="fadein">
        <a href="yahoo.com"><img src="banner1.jpg" width="645" height="307" alt="1" /></a>
        <a href="google.com"><img src="banner2.jpg" width="645" height="307" alt="2" /></a>
        <a href="live.com"><img src="banner3.jpg" width="645" height="307" alt="3" /></a>
      </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's to prevent out-of-order execution. From a link that has… May 15, 2026 at 1:12 am
  • Editorial Team
    Editorial Team added an answer How about this? First write a one-argument memoizer: static Func<A,… May 15, 2026 at 1:12 am
  • Editorial Team
    Editorial Team added an answer Have you tried using an empty transparent image? Try: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oFFAADATTAuQQAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAEklEQVQ4y2NgGAWjYBSMAggAAAQQAAGFP6pyAAAAAElFTkSuQmCC May 15, 2026 at 1:12 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

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.