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

Related Questions

When using one's own iPhone for development it's easy enough to access any crash
Is there a benefit to using one over the other? In Python 2, they
I'd like to split a string using one or more separator characters. E.g. a
When communicating to a SQL Server database using one of the typical systems, ODBC,
Is there any advantage in using one over the other? Should I use the
I want to use a string that I have been using in one aspx.cs
OpenGL. Let's say I've drawn one image and then the second one using XOR.
If I have 10 tabs opened, I have to close each one using :q
ADDED: This question is now, I believe, subsumed by this one: Using GNU Screen
I started using subversion for one of my projects and it would be absolutely

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.