Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - jquery slide show automatically rotates
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedjquery slide show automatically rotates

 Post Reply Post Reply
Author
RCorr View Drop Down
Groupie
Groupie


Joined: 21 January 2003
Status: Offline
Points: 126
Direct Link To This Post Topic: jquery slide show automatically rotates
    Posted: 16 February 2011 at 5:19pm
Hello,

I have created my version of a jquery slide show based on the following tutorial, http://designm.ag/tutorials/image-rotator-css-jquery/.   This tutorial is the best example I've seen.   One feature that this tutorial doesn't has is an automatic rotating feature.  I provide the code below.  If anyone  knows how I can implement an automatic rotating feature, I will be gladly appreciated.

<script type="text/javascript">
$(document).ready(function() {   
 
    //Click and Hover events for thumbnail list
    $(".image_thumb ul li:first").addClass('active');
    //$(".image_thumb ul li").click(function(){
    $(".image_thumb ul li").hover(function(){
        //Set Variables
        var imgAlt = $(this).find('img').attr("alt"); //Get Alt Tag of Image
        var imgURL = $(this).find('a').attr("href"); //Get Main Image URL
        var imgPath = $(this).find('a').attr("rel"); //Get Main Image path
        var imgDesc = $(this).find('.block').html();     //Get HTML of block
      
        if ($(this).is(".active")) {  //If it's already active, then...
            return false; // Don't click through
        } else {           
            $(".main_image a").attr({href: imgURL}); // sets href value for main images
            $(".main_image img").attr({ src: imgPath , alt: imgAlt}); // swap images based on one user currently hovering.
        }
       
        $(".image_thumb ul li").removeClass('active'); //Remove class of 'active' on all lists
        $(this).addClass('active');  //add class of 'active' on this list only
        return false;
       
    }) .hover(function(){
        $(this).addClass('hover');
        }, function() {
        $(this).removeClass('hover');
    });
   
});//Close Function
</script>

An example of this can be found at http://www.ecoactionteams.ca/pub/image_rotator/index.html

rpcorr
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.