<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Zander Labs - Wagstaff's Action Stream</title>
    <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/" />
    <link rel="self" type="application/atom+xml" href="http://www.alohatechsupport.net/webdesignmaui/action-stream.xml" />
    <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams</id>
    <updated>2013-02-26T23:28:31Z</updated>
    <subtitle>Web Design Galdorword, Website Designer Articles and Ideas.</subtitle>

       
     <entry>
      
        <title>Dylan Wagstaff commented on Show Hide Expand Collapse Javascript</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/732</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-637" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.98</entryid>
           <published>2013-02-26T23:28:31Z</published>
           <updated>2013-02-26T23:28:31Z</updated>
           <summary>Show, Hide, Expand, Collapse and Toggle functions with JQuery.

Can I show hide or expand collapse a html element like a div with java script?
Yes, this guide will allow you in just a few lines of code, to have a on click show hide content area that can expand and collapse.

The first Step is to download JQuery and upload it to your server. One great thing about jQuery is the fact that it uses standard css styles which will make things really easy for us.

Once jquery is uploaded set up your in-page html. The overall structure doesn&apos;t matter that much, just as long as you use unique classes so that JQuery knows what to show and hide on command.


Show/Hide

This will get shown/hidden depending on the toggle above.



 
Expand collapse script summary: How it works. The show hide toggle on click function selects the html element that you initially want to have hidden, which will later be shown. In this case we&apos;re selecting a div tag that has the view class attached to it. Next you throw a hide() command at it, so that when the page loads we are initially hiding the view div information.

At this point you need to add the show hide toggle command. A.k.a the link that we&apos;ve added a slide class to, and watch it for clicks. Once someone clicks that link, we run a expand collapse toggle() function to show and hide the state of our view div. The toggle function is incredibly useful, as it constantly is aware of it&apos;s existing state and will alternate for us which saves us having to have any record of whether the item is already open or closed.

The last part of the script, the &quot;400″ in your toggle function is the speed. You can either use a number, or use a word such as &quot;slow&quot;, &quot;fast&quot;, etc.. keep in mind though, when using words you do need to put them inside &apos;quotation marks&apos; for it to register.

The final script for a single instance along with JQuery gets put in the head of your document:


  $(document).ready(function() {
  // Hide the &quot;view&quot; div.
  $(&apos;div.view&apos;).hide();
  // Watch for clicks on the &quot;slide&quot; link.
  $(&apos;div.slide&apos;).click(function() {
  // When clicked, toggle the &quot;view&quot; div.
  $(&apos;div.view&apos;).slideToggle(400);
  return false;
});
});



If you would like to have multiple instances on the same page click &quot;continue reading&quot; below and use the following code instead which uses siblings for multiple sliders on the same page.
Continue reading...



The below example uses &quot;siblings&quot; so we can have multiple .view and .slide divs that collapse and expand on the same page. The setup up is the same as above except for the use of the code below instead of the one listed above and the use of multiple .view .slide divs on the same page.



 $(document).ready(function() {
 $(&apos;div.view&apos;).hide();
 $(&apos;div.slide&apos;).toggle(function() {
 $(this).siblings(&apos;div.view&apos;).fadeIn(&apos;slow&apos;);
 }, function() {
 $(this).siblings(&apos;div.view&apos;).fadeOut(&apos;fast&apos;);
 return false;
});
});



That&apos;s it! It&apos;s really that simple, just add a few lines of code and you have an html element that can expand or collapse. You can use this javascript to show and hide paragraphs, individual links, images, or entire sections of your page.
</summary>
           <author>
             <name>Dylan Wagstaff</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-637</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Dylan Wagstaff <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-637">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-637">Show Hide Expand Collapse Javascript</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>davinci7 commented on Show Hide Expand Collapse Javascript</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/725</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-623" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.98</entryid>
           <published>2012-09-28T04:00:28Z</published>
           <updated>2012-09-28T04:00:28Z</updated>
           <summary>Show, Hide, Expand, Collapse and Toggle functions with JQuery.

Can I show hide or expand collapse a html element like a div with java script?
Yes, this guide will allow you in just a few lines of code, to have a on click show hide content area that can expand and collapse.

The first Step is to download JQuery and upload it to your server. One great thing about jQuery is the fact that it uses standard css styles which will make things really easy for us.

Once jquery is uploaded set up your in-page html. The overall structure doesn&apos;t matter that much, just as long as you use unique classes so that JQuery knows what to show and hide on command.


Show/Hide

This will get shown/hidden depending on the toggle above.



 
Expand collapse script summary: How it works. The show hide toggle on click function selects the html element that you initially want to have hidden, which will later be shown. In this case we&apos;re selecting a div tag that has the view class attached to it. Next you throw a hide() command at it, so that when the page loads we are initially hiding the view div information.

At this point you need to add the show hide toggle command. A.k.a the link that we&apos;ve added a slide class to, and watch it for clicks. Once someone clicks that link, we run a expand collapse toggle() function to show and hide the state of our view div. The toggle function is incredibly useful, as it constantly is aware of it&apos;s existing state and will alternate for us which saves us having to have any record of whether the item is already open or closed.

The last part of the script, the &quot;400″ in your toggle function is the speed. You can either use a number, or use a word such as &quot;slow&quot;, &quot;fast&quot;, etc.. keep in mind though, when using words you do need to put them inside &apos;quotation marks&apos; for it to register.

The final script for a single instance along with JQuery gets put in the head of your document:


  $(document).ready(function() {
  // Hide the &quot;view&quot; div.
  $(&apos;div.view&apos;).hide();
  // Watch for clicks on the &quot;slide&quot; link.
  $(&apos;div.slide&apos;).click(function() {
  // When clicked, toggle the &quot;view&quot; div.
  $(&apos;div.view&apos;).slideToggle(400);
  return false;
});
});



If you would like to have multiple instances on the same page click &quot;continue reading&quot; below and use the following code instead which uses siblings for multiple sliders on the same page.
Continue reading...



The below example uses &quot;siblings&quot; so we can have multiple .view and .slide divs that collapse and expand on the same page. The setup up is the same as above except for the use of the code below instead of the one listed above and the use of multiple .view .slide divs on the same page.



 $(document).ready(function() {
 $(&apos;div.view&apos;).hide();
 $(&apos;div.slide&apos;).toggle(function() {
 $(this).siblings(&apos;div.view&apos;).fadeIn(&apos;slow&apos;);
 }, function() {
 $(this).siblings(&apos;div.view&apos;).fadeOut(&apos;fast&apos;);
 return false;
});
});



That&apos;s it! It&apos;s really that simple, just add a few lines of code and you have an html element that can expand or collapse. You can use this javascript to show and hide paragraphs, individual links, images, or entire sections of your page.
</summary>
           <author>
             <name>davinci7</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-623</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[davinci7 <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-623">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-623">Show Hide Expand Collapse Javascript</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>davinci7 commented on Show Hide Expand Collapse Javascript</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/724</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-622" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.98</entryid>
           <published>2012-09-28T03:59:56Z</published>
           <updated>2012-09-28T03:59:56Z</updated>
           <summary>Show, Hide, Expand, Collapse and Toggle functions with JQuery.

Can I show hide or expand collapse a html element like a div with java script?
Yes, this guide will allow you in just a few lines of code, to have a on click show hide content area that can expand and collapse.

The first Step is to download JQuery and upload it to your server. One great thing about jQuery is the fact that it uses standard css styles which will make things really easy for us.

Once jquery is uploaded set up your in-page html. The overall structure doesn&apos;t matter that much, just as long as you use unique classes so that JQuery knows what to show and hide on command.


Show/Hide

This will get shown/hidden depending on the toggle above.



 
Expand collapse script summary: How it works. The show hide toggle on click function selects the html element that you initially want to have hidden, which will later be shown. In this case we&apos;re selecting a div tag that has the view class attached to it. Next you throw a hide() command at it, so that when the page loads we are initially hiding the view div information.

At this point you need to add the show hide toggle command. A.k.a the link that we&apos;ve added a slide class to, and watch it for clicks. Once someone clicks that link, we run a expand collapse toggle() function to show and hide the state of our view div. The toggle function is incredibly useful, as it constantly is aware of it&apos;s existing state and will alternate for us which saves us having to have any record of whether the item is already open or closed.

The last part of the script, the &quot;400″ in your toggle function is the speed. You can either use a number, or use a word such as &quot;slow&quot;, &quot;fast&quot;, etc.. keep in mind though, when using words you do need to put them inside &apos;quotation marks&apos; for it to register.

The final script for a single instance along with JQuery gets put in the head of your document:


  $(document).ready(function() {
  // Hide the &quot;view&quot; div.
  $(&apos;div.view&apos;).hide();
  // Watch for clicks on the &quot;slide&quot; link.
  $(&apos;div.slide&apos;).click(function() {
  // When clicked, toggle the &quot;view&quot; div.
  $(&apos;div.view&apos;).slideToggle(400);
  return false;
});
});



If you would like to have multiple instances on the same page click &quot;continue reading&quot; below and use the following code instead which uses siblings for multiple sliders on the same page.
Continue reading...



The below example uses &quot;siblings&quot; so we can have multiple .view and .slide divs that collapse and expand on the same page. The setup up is the same as above except for the use of the code below instead of the one listed above and the use of multiple .view .slide divs on the same page.



 $(document).ready(function() {
 $(&apos;div.view&apos;).hide();
 $(&apos;div.slide&apos;).toggle(function() {
 $(this).siblings(&apos;div.view&apos;).fadeIn(&apos;slow&apos;);
 }, function() {
 $(this).siblings(&apos;div.view&apos;).fadeOut(&apos;fast&apos;);
 return false;
});
});



That&apos;s it! It&apos;s really that simple, just add a few lines of code and you have an html element that can expand or collapse. You can use this javascript to show and hide paragraphs, individual links, images, or entire sections of your page.
</summary>
           <author>
             <name>davinci7</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-622</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[davinci7 <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-622">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-622">Show Hide Expand Collapse Javascript</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>rachel xu commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/723</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-621" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2012-09-27T21:52:07Z</published>
           <updated>2012-09-27T21:52:07Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>rachel xu</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-621</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[rachel xu <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-621">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-621">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>polmajk commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/722</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-620" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-08-18T09:37:27Z</published>
           <updated>2012-08-18T09:37:27Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>polmajk</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-620</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[polmajk <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-620">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-620">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Jon commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/720</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-618" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-08-10T23:03:22Z</published>
           <updated>2012-08-10T23:03:22Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Jon</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-618</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Jon <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-618">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-618">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Ann F. commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/719</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-617" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-08-02T18:26:36Z</published>
           <updated>2012-08-02T18:26:36Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Ann F.</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-617</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Ann F. <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-617">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-617">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>nathan895 commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/718</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-616" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-07-23T08:18:19Z</published>
           <updated>2012-07-23T08:18:19Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>nathan895</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-616</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[nathan895 <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-616">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-616">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>rafia commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/717</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-615" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2012-06-27T08:29:01Z</published>
           <updated>2012-06-27T08:29:01Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>rafia</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-615</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[rafia <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-615">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-615">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Sherm commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/716</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-614" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-06-12T21:34:41Z</published>
           <updated>2012-06-12T21:34:41Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Sherm</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-614</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Sherm <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-614">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-614">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Sherm commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/715</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-613" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-06-12T21:28:21Z</published>
           <updated>2012-06-12T21:28:21Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Sherm</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-613</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Sherm <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-613">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-613">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Sherm commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/714</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-612" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-06-12T21:09:37Z</published>
           <updated>2012-06-12T21:09:37Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Sherm</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-612</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Sherm <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-612">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-612">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>studiod2 commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/713</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-611" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-05-16T16:36:04Z</published>
           <updated>2012-05-16T16:36:04Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>studiod2</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-611</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[studiod2 <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-611">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-611">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>jastech29 commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/712</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-610" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2012-04-02T22:43:15Z</published>
           <updated>2012-04-02T22:43:15Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>jastech29</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-610</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[jastech29 <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-610">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-610">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>PeterU commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/711</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-609" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2012-03-24T10:51:05Z</published>
           <updated>2012-03-24T10:51:05Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>PeterU</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-609</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[PeterU <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-609">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-609">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>lizc commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/710</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-608" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-03-22T00:43:56Z</published>
           <updated>2012-03-22T00:43:56Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>lizc</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-608</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[lizc <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-608">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-608">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>i am r commented on Show Hide Expand Collapse Javascript</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/709</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-606" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.98</entryid>
           <published>2012-03-11T19:11:10Z</published>
           <updated>2012-03-11T19:11:10Z</updated>
           <summary>Show, Hide, Expand, Collapse and Toggle functions with JQuery.

Can I show hide or expand collapse a html element like a div with java script?
Yes, this guide will allow you in just a few lines of code, to have a on click show hide content area that can expand and collapse.

The first Step is to download JQuery and upload it to your server. One great thing about jQuery is the fact that it uses standard css styles which will make things really easy for us.

Once jquery is uploaded set up your in-page html. The overall structure doesn&apos;t matter that much, just as long as you use unique classes so that JQuery knows what to show and hide on command.


Show/Hide

This will get shown/hidden depending on the toggle above.



 
Expand collapse script summary: How it works. The show hide toggle on click function selects the html element that you initially want to have hidden, which will later be shown. In this case we&apos;re selecting a div tag that has the view class attached to it. Next you throw a hide() command at it, so that when the page loads we are initially hiding the view div information.

At this point you need to add the show hide toggle command. A.k.a the link that we&apos;ve added a slide class to, and watch it for clicks. Once someone clicks that link, we run a expand collapse toggle() function to show and hide the state of our view div. The toggle function is incredibly useful, as it constantly is aware of it&apos;s existing state and will alternate for us which saves us having to have any record of whether the item is already open or closed.

The last part of the script, the &quot;400″ in your toggle function is the speed. You can either use a number, or use a word such as &quot;slow&quot;, &quot;fast&quot;, etc.. keep in mind though, when using words you do need to put them inside &apos;quotation marks&apos; for it to register.

The final script for a single instance along with JQuery gets put in the head of your document:


  $(document).ready(function() {
  // Hide the &quot;view&quot; div.
  $(&apos;div.view&apos;).hide();
  // Watch for clicks on the &quot;slide&quot; link.
  $(&apos;div.slide&apos;).click(function() {
  // When clicked, toggle the &quot;view&quot; div.
  $(&apos;div.view&apos;).slideToggle(400);
  return false;
});
});



If you would like to have multiple instances on the same page click &quot;continue reading&quot; below and use the following code instead which uses siblings for multiple sliders on the same page.
Continue reading...



The below example uses &quot;siblings&quot; so we can have multiple .view and .slide divs that collapse and expand on the same page. The setup up is the same as above except for the use of the code below instead of the one listed above and the use of multiple .view .slide divs on the same page.



 $(document).ready(function() {
 $(&apos;div.view&apos;).hide();
 $(&apos;div.slide&apos;).toggle(function() {
 $(this).siblings(&apos;div.view&apos;).fadeIn(&apos;slow&apos;);
 }, function() {
 $(this).siblings(&apos;div.view&apos;).fadeOut(&apos;fast&apos;);
 return false;
});
});



That&apos;s it! It&apos;s really that simple, just add a few lines of code and you have an html element that can expand or collapse. You can use this javascript to show and hide paragraphs, individual links, images, or entire sections of your page.
</summary>
           <author>
             <name>i am r</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-606</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[i am r <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-606">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-606">Show Hide Expand Collapse Javascript</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>PeterU commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/708</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-605" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2012-03-10T16:02:19Z</published>
           <updated>2012-03-10T16:02:19Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>PeterU</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-605</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[PeterU <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-605">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-605">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>PeterU commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/707</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-604" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2012-03-10T15:41:32Z</published>
           <updated>2012-03-10T15:41:32Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>PeterU</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-604</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[PeterU <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-604">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-604">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Flying Squash commented on Show Hide Expand Collapse Javascript</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/705</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-599" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.98</entryid>
           <published>2012-02-10T21:54:25Z</published>
           <updated>2012-02-10T21:54:25Z</updated>
           <summary>Show, Hide, Expand, Collapse and Toggle functions with JQuery.

Can I show hide or expand collapse a html element like a div with java script?
Yes, this guide will allow you in just a few lines of code, to have a on click show hide content area that can expand and collapse.

The first Step is to download JQuery and upload it to your server. One great thing about jQuery is the fact that it uses standard css styles which will make things really easy for us.

Once jquery is uploaded set up your in-page html. The overall structure doesn&apos;t matter that much, just as long as you use unique classes so that JQuery knows what to show and hide on command.


Show/Hide

This will get shown/hidden depending on the toggle above.



 
Expand collapse script summary: How it works. The show hide toggle on click function selects the html element that you initially want to have hidden, which will later be shown. In this case we&apos;re selecting a div tag that has the view class attached to it. Next you throw a hide() command at it, so that when the page loads we are initially hiding the view div information.

At this point you need to add the show hide toggle command. A.k.a the link that we&apos;ve added a slide class to, and watch it for clicks. Once someone clicks that link, we run a expand collapse toggle() function to show and hide the state of our view div. The toggle function is incredibly useful, as it constantly is aware of it&apos;s existing state and will alternate for us which saves us having to have any record of whether the item is already open or closed.

The last part of the script, the &quot;400″ in your toggle function is the speed. You can either use a number, or use a word such as &quot;slow&quot;, &quot;fast&quot;, etc.. keep in mind though, when using words you do need to put them inside &apos;quotation marks&apos; for it to register.

The final script for a single instance along with JQuery gets put in the head of your document:


  $(document).ready(function() {
  // Hide the &quot;view&quot; div.
  $(&apos;div.view&apos;).hide();
  // Watch for clicks on the &quot;slide&quot; link.
  $(&apos;div.slide&apos;).click(function() {
  // When clicked, toggle the &quot;view&quot; div.
  $(&apos;div.view&apos;).slideToggle(400);
  return false;
});
});



If you would like to have multiple instances on the same page click &quot;continue reading&quot; below and use the following code instead which uses siblings for multiple sliders on the same page.
Continue reading...



The below example uses &quot;siblings&quot; so we can have multiple .view and .slide divs that collapse and expand on the same page. The setup up is the same as above except for the use of the code below instead of the one listed above and the use of multiple .view .slide divs on the same page.



 $(document).ready(function() {
 $(&apos;div.view&apos;).hide();
 $(&apos;div.slide&apos;).toggle(function() {
 $(this).siblings(&apos;div.view&apos;).fadeIn(&apos;slow&apos;);
 }, function() {
 $(this).siblings(&apos;div.view&apos;).fadeOut(&apos;fast&apos;);
 return false;
});
});



That&apos;s it! It&apos;s really that simple, just add a few lines of code and you have an html element that can expand or collapse. You can use this javascript to show and hide paragraphs, individual links, images, or entire sections of your page.
</summary>
           <author>
             <name>Flying Squash</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-599</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Flying Squash <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-599">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-599">Show Hide Expand Collapse Javascript</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Leslie commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/704</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-598" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-02-10T00:49:20Z</published>
           <updated>2012-02-10T00:49:20Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Leslie</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-598</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Leslie <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-598">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-598">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Tracy commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/703</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-597" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-02-08T12:18:40Z</published>
           <updated>2012-02-08T12:18:40Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Tracy</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-597</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Tracy <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-597">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-597">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Melificent commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/701</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-594" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-01-17T15:59:35Z</published>
           <updated>2012-01-17T15:59:35Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Melificent</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-594</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Melificent <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-594">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-594">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Melificent commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/700</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-593" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-01-17T15:57:46Z</published>
           <updated>2012-01-17T15:57:46Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Melificent</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-593</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Melificent <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-593">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-593">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Tané Tachyon commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/699</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-592" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-01-16T20:39:33Z</published>
           <updated>2012-01-16T20:39:33Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Tané Tachyon</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-592</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Tané Tachyon <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-592">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-592">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Tané Tachyon commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/698</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-591" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-01-16T20:39:19Z</published>
           <updated>2012-01-16T20:39:19Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Tané Tachyon</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-591</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Tané Tachyon <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-591">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-591">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Marc commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/697</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-590" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-01-03T22:39:39Z</published>
           <updated>2012-01-03T22:39:39Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Marc</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-590</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Marc <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-590">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-590">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Marc commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/696</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-589" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2012-01-03T21:56:56Z</published>
           <updated>2012-01-03T21:56:56Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Marc</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-589</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Marc <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-589">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-589">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>babayard commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/695</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-585" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-12-09T07:11:41Z</published>
           <updated>2011-12-09T07:11:41Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>babayard</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-585</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[babayard <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-585">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-585">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>cgregory commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/694</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-584" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-11-21T22:42:40Z</published>
           <updated>2011-11-21T22:42:40Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>cgregory</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-584</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[cgregory <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-584">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-584">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>cgregory commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/693</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-583" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-11-21T22:42:10Z</published>
           <updated>2011-11-21T22:42:10Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>cgregory</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-583</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[cgregory <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-583">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-583">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>cgregory commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/692</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-582" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-11-21T22:41:41Z</published>
           <updated>2011-11-21T22:41:41Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>cgregory</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-582</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[cgregory <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-582">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-582">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>jamesvoce commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/691</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-581" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-11-21T00:34:55Z</published>
           <updated>2011-11-21T00:34:55Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>jamesvoce</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-581</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[jamesvoce <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-581">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-581">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>paco commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/690</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-580" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-11-17T19:38:47Z</published>
           <updated>2011-11-17T19:38:47Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>paco</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-580</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[paco <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-580">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-580">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>paco commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/689</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-579" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-11-17T19:38:15Z</published>
           <updated>2011-11-17T19:38:15Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>paco</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-579</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[paco <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-579">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-579">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>snowmartin commented on Show Hide Expand Collapse Javascript</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/687</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-577" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.98</entryid>
           <published>2011-10-27T16:57:51Z</published>
           <updated>2011-10-27T16:57:51Z</updated>
           <summary>Show, Hide, Expand, Collapse and Toggle functions with JQuery.

Can I show hide or expand collapse a html element like a div with java script?
Yes, this guide will allow you in just a few lines of code, to have a on click show hide content area that can expand and collapse.

The first Step is to download JQuery and upload it to your server. One great thing about jQuery is the fact that it uses standard css styles which will make things really easy for us.

Once jquery is uploaded set up your in-page html. The overall structure doesn&apos;t matter that much, just as long as you use unique classes so that JQuery knows what to show and hide on command.


Show/Hide

This will get shown/hidden depending on the toggle above.



 
Expand collapse script summary: How it works. The show hide toggle on click function selects the html element that you initially want to have hidden, which will later be shown. In this case we&apos;re selecting a div tag that has the view class attached to it. Next you throw a hide() command at it, so that when the page loads we are initially hiding the view div information.

At this point you need to add the show hide toggle command. A.k.a the link that we&apos;ve added a slide class to, and watch it for clicks. Once someone clicks that link, we run a expand collapse toggle() function to show and hide the state of our view div. The toggle function is incredibly useful, as it constantly is aware of it&apos;s existing state and will alternate for us which saves us having to have any record of whether the item is already open or closed.

The last part of the script, the &quot;400″ in your toggle function is the speed. You can either use a number, or use a word such as &quot;slow&quot;, &quot;fast&quot;, etc.. keep in mind though, when using words you do need to put them inside &apos;quotation marks&apos; for it to register.

The final script for a single instance along with JQuery gets put in the head of your document:


  $(document).ready(function() {
  // Hide the &quot;view&quot; div.
  $(&apos;div.view&apos;).hide();
  // Watch for clicks on the &quot;slide&quot; link.
  $(&apos;div.slide&apos;).click(function() {
  // When clicked, toggle the &quot;view&quot; div.
  $(&apos;div.view&apos;).slideToggle(400);
  return false;
});
});



If you would like to have multiple instances on the same page click &quot;continue reading&quot; below and use the following code instead which uses siblings for multiple sliders on the same page.
Continue reading...



The below example uses &quot;siblings&quot; so we can have multiple .view and .slide divs that collapse and expand on the same page. The setup up is the same as above except for the use of the code below instead of the one listed above and the use of multiple .view .slide divs on the same page.



 $(document).ready(function() {
 $(&apos;div.view&apos;).hide();
 $(&apos;div.slide&apos;).toggle(function() {
 $(this).siblings(&apos;div.view&apos;).fadeIn(&apos;slow&apos;);
 }, function() {
 $(this).siblings(&apos;div.view&apos;).fadeOut(&apos;fast&apos;);
 return false;
});
});



That&apos;s it! It&apos;s really that simple, just add a few lines of code and you have an html element that can expand or collapse. You can use this javascript to show and hide paragraphs, individual links, images, or entire sections of your page.
</summary>
           <author>
             <name>snowmartin</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-577</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[snowmartin <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-577">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/show_hide_expand_collapse_javascript.html#comment-577">Show Hide Expand Collapse Javascript</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Nathan commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/685</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-575" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-10-26T22:24:05Z</published>
           <updated>2011-10-26T22:24:05Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Nathan</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-575</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Nathan <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-575">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-575">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>samath commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/684</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-574" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-10-14T05:56:35Z</published>
           <updated>2011-10-14T05:56:35Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>samath</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-574</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[samath <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-574">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-574">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>samath commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/683</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-573" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-10-14T05:55:40Z</published>
           <updated>2011-10-14T05:55:40Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>samath</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-573</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[samath <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-573">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-573">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>samath commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/682</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-572" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-10-14T05:53:04Z</published>
           <updated>2011-10-14T05:53:04Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>samath</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-572</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[samath <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-572">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-572">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Jorge commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/681</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-571" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-10-05T18:35:05Z</published>
           <updated>2011-10-05T18:35:05Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Jorge</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-571</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Jorge <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-571">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-571">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Jay commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/680</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-568" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2011-09-12T07:00:57Z</published>
           <updated>2011-09-12T07:00:57Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>Jay</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-568</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Jay <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-568">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-568">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Jesse commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/679</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-565" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-09-10T22:20:37Z</published>
           <updated>2011-09-10T22:20:37Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Jesse</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-565</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Jesse <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-565">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-565">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Dylan commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/678</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-562" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-09-10T20:03:43Z</published>
           <updated>2011-09-10T20:14:43Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Dylan</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-562</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Dylan <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-562">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-562">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Dan commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/676</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-560" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-09-08T19:58:51Z</published>
           <updated>2011-09-08T19:58:51Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Dan</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-560</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Dan <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-560">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-560">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Mark commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/672</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-556" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-09-06T17:47:31Z</published>
           <updated>2011-09-06T17:47:31Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Mark</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-556</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Mark <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-556">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-556">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Web Design Cleveland commented on Best Movable Type Plugins</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/hawaii-web-design/best_movable_type_plugins.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/671</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/hawaii-web-design/best_movable_type_plugins.html#comment-554" />
          
           <entryid>tag:alohatechsupport.net,2009:/webdesignmaui//1.56</entryid>
           <published>2011-09-05T06:39:58Z</published>
           <updated>2011-09-05T06:39:58Z</updated>
           <summary>The Best Movable Type Blog Plugins
What are the best plugins available for a Movable Type blog? First a few words about Movable Type. Movable Type blogs can offer maximum SEO potential for your blog entries. I have found that blog posts will normally appear ranked well in Google within a few days or so after being posting. However Search Engine Optimization or SEO for Movable Type will take some tweaking but the rewards are well worth the effort. One key factor is that MovableType can easily be configured to write seo friendly .html or non dynamic pages. Below I have listed a few of the best Movable Type plugins for MovableType.
Continue reading...

Hybrid Pagination plugin similar to  MTPaginate offers support for paginating your Movable type blog, which relies on Movable Types dynamic publishing feature.

LightBox for Movable Type picture plugin will add LightBox to your Movable Type blog by including a rel=&quot;ligthbox&quot; tag automatically to your new images.

Previous and next in category Movable Type plugin will add previous and next links to your blog categories.

Image Gallery Plugin for Movable Type will help to create image picture galleries through cms.


The Recent Image Plugin for Movable Type will allow you to include recent images easily in your blog templates.


Sociotags is a plug-in for Movable Type 4 that adds a list of social bookmarks or &quot;sociotags&quot; to your blogs entries. Social tags are the little image bookmarks that you may have seen on various pages that let you add the page to social networks or promotional lists such as Digg, Technorati, Del.icio.us, Slashdot, etc.

Mid-Century template set theme. The Mid Century Theme shows the amazing features found in Movable Type like AJAX commenting and search, auto complete, related entries, tag clouds, and more. Template set theme by Jim Ramsey.

Movable Type Plugins can be easily installed by uploading them to appropriate plugin folders within your Movable Type installation directory. You can refer to individual plug-in installation guides usually found in each plugin download. View all Movable Type Plugins.
</summary>
           <author>
             <name>Web Design Cleveland</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/hawaii-web-design/best_movable_type_plugins.html#comment-554</uri>
           </author>
        <category term="Design Tutorials &amp; Articles" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="blog" label="blog" scheme="http://www.sixapart.com/ns/types#tag" /><category term="movabletype" label="movable type" scheme="http://www.sixapart.com/ns/types#tag" /><category term="plugins" label="plugins" scheme="http://www.sixapart.com/ns/types#tag" /><category term="seo" label="seo" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Web Design Cleveland <a href="http://www.alohatechsupport.net/webdesignmaui/hawaii-web-design/best_movable_type_plugins.html#comment-554">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/hawaii-web-design/best_movable_type_plugins.html#comment-554">Best Movable Type Plugins</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Mark commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/669</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-552" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-09-02T20:21:18Z</published>
           <updated>2011-09-02T20:21:18Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Mark</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-552</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Mark <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-552">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-552">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Dylan commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/668</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-551" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-08-26T19:11:03Z</published>
           <updated>2011-08-26T19:11:03Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Dylan</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-551</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Dylan <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-551">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-551">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>anders commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/667</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-550" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-08-26T06:14:03Z</published>
           <updated>2011-08-26T06:14:03Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>anders</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-550</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[anders <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-550">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-550">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Dylan commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/666</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-549" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-08-20T21:28:13Z</published>
           <updated>2011-08-20T21:28:13Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Dylan</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-549</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Dylan <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-549">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-549">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Robin commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/662</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-545" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2011-07-28T21:56:28Z</published>
           <updated>2011-07-28T21:56:28Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>Robin</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-545</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Robin <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-545">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-545">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Robin commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/661</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-544" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2011-07-28T21:55:13Z</published>
           <updated>2011-07-28T21:55:13Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>Robin</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-544</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Robin <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-544">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-544">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Kristen commented on Layer Flash Under HTML</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-design-articles/layer_flash_under_html.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/660</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-design-articles/layer_flash_under_html.html#comment-543" />
          
           <entryid>tag:alohatechsupport.net,2007:/webdesignmaui//1.50</entryid>
           <published>2011-07-27T20:00:24Z</published>
           <updated>2011-07-27T20:00:24Z</updated>
           <summary><![CDATA[Flash and Positioning XHTML Div LayersIs there a way to have a flash movie play below another layer like an html text heading or div tag?Answer: Yes, this is actually fairly simple but is a several part process depending on how may different items you would like to position above the flash element.1. First you must add the wmode parameter transparent to the flash object that is going to be embedded.Like so...&nbsp; &lt;param name=&quot;wmode&quot; value=&quot;transparent&quot; /&gt;(note:) If you are using the swfobject.js method to embed your flash files (recommended) you can add the transparent parameter by simply using the example below to append to your current setup:&lt;script type=&quot;text/javascript&quot;&gt;&nbsp;&nbsp; var so = new SWFObject(&quot;movie.swf&quot;, &quot;movie&quot;, &quot;700&quot;, &quot;300&quot;, &quot;#ffffff&quot;);&nbsp;&nbsp; so.addParam(&quot;wmode&quot;, &quot;transparent&quot;);&nbsp;&nbsp; so.write(&quot;flashcontent&quot;);&lt;/script&gt; &nbsp;2. Now we need to wrap our flash movie in its own div tag and and apply some css so that we can set the position to be below the header text and description div.(See example below for xhtml and css code.)&lt;div id=&quot;header&quot;&gt;&lt;div id=&quot;flash&quot;&gt;flash file goes here.&lt;/div&gt;&lt;/div&gt;&nbsp;And the accompanying css for the above is:(note the z-index and absolute position for #flash div)#flash {&nbsp;&nbsp;&nbsp; width: 700px;&nbsp;&nbsp;&nbsp; height: 300px;&nbsp;&nbsp;&nbsp; position: absolute;&nbsp;&nbsp;&nbsp; z-index: 0;}#header {&nbsp;&nbsp;&nbsp; height: 300px;&nbsp;&nbsp;&nbsp; margin-bottom: 30px;&nbsp;&nbsp;&nbsp; text-align: left;} &nbsp;3. Ok, now lets go ahead and set up the html layers that will be displayed displayed above our flash content. In this case it will be an h1 header and a description that is in its own div that is above the flash media.(Two items to be positioned over the flash movie)The h1 css is: (note: feel free to style it however you want or use a different tag, the important thing is the z-index and absolute position.h1 {&nbsp;&nbsp;&nbsp; padding-top: 15px;&nbsp;&nbsp;&nbsp; padding-bottom: 15px;&nbsp;&nbsp;&nbsp; margin-left: 10px;&nbsp;&nbsp;&nbsp; font-family: Verdana, Arial, Helvetica, sans-serif;&nbsp;&nbsp;&nbsp; font-size: 24px;&nbsp;&nbsp;&nbsp; color: #666666;&nbsp;&nbsp;&nbsp; font-weight: bold;&nbsp;&nbsp;&nbsp; position: absolute;&nbsp;&nbsp;&nbsp; z-index: 1;} &nbsp;Now for the description css which is going to be in its own div tag containing text and will be positioned above the flash element as well: (note the z-index and the absolute position again).description {&nbsp;&nbsp;&nbsp; font-family: Verdana, Arial, Helvetica, sans-serif;&nbsp;&nbsp;&nbsp; font-size: 9px;&nbsp;&nbsp;&nbsp; color: #FFFFFF;&nbsp;&nbsp;&nbsp; margin-left: 15px;&nbsp;&nbsp;&nbsp; margin-top: 35px;&nbsp;&nbsp;&nbsp; padding: 5px;&nbsp;&nbsp;&nbsp; font-weight: bold;&nbsp;&nbsp;&nbsp; line-height: 14px;&nbsp;&nbsp;&nbsp; position: absolute;&nbsp;&nbsp;&nbsp; z-index: 1;} 4. Thats it, the finished code in the body of a web page will look like this:(note: Code is placed in the header div which has no z-index or absolute position necessary)&lt;div id=&quot;header&quot;&gt;&lt;div id=&quot;flash&quot;&gt;flash file goes here.&lt;/div&gt;&lt;h1&gt;Heading Text&lt;/h1&gt;&lt;div class=&quot;description&quot;&gt;Your description text&lt;/div&gt; &lt;/div&gt;And the final accompanying CSS is:h1 { &nbsp;&nbsp;&nbsp; padding-top: 15px; &nbsp;&nbsp;&nbsp; padding-bottom: 15px; &nbsp;&nbsp;&nbsp; margin-left: 10px; &nbsp;&nbsp;&nbsp; font-family: Verdana, Arial, Helvetica, sans-serif; &nbsp;&nbsp;&nbsp; font-size: 24px; &nbsp;&nbsp;&nbsp; color: #666666; &nbsp;&nbsp;&nbsp; font-weight: bold; &nbsp;&nbsp;&nbsp; position: absolute; &nbsp;&nbsp;&nbsp; z-index: 1; }.description { &nbsp;&nbsp;&nbsp; font-family: Verdana, Arial, Helvetica, sans-serif; &nbsp;&nbsp;&nbsp; font-size: 9px; &nbsp;&nbsp;&nbsp; color: #FFFFFF; &nbsp;&nbsp;&nbsp; margin-left: 15px; &nbsp;&nbsp;&nbsp; margin-top: 35px; &nbsp;&nbsp;&nbsp; padding: 5px; &nbsp;&nbsp;&nbsp; font-weight: bold; &nbsp;&nbsp;&nbsp; line-height: 14px; &nbsp;&nbsp;&nbsp; position: absolute; &nbsp;&nbsp;&nbsp; z-index: 1; }#flash { &nbsp;&nbsp;&nbsp; width: 700px; &nbsp;&nbsp;&nbsp; height: 300px; &nbsp;&nbsp;&nbsp; position: absolute; &nbsp;&nbsp;&nbsp; z-index: 0; }#header { &nbsp;&nbsp;&nbsp; height: 300px; &nbsp;&nbsp;&nbsp; margin-bottom: 30px; &nbsp;&nbsp;&nbsp; text-align: left; }HTML Layers and Flash Position Summary:How to layer a Flash movie below another html div tag or layer.To position a flash movie under another html element basically you just need to give the flash move a parameter of wmode transparent and position it absolutely with a z-index of 0. Do this by putting the flash object in its own div and using css. (see examples above)For the items that you would like positioned above the flash movie set their z-index to 1 and position them absolutely as well. After that it's just a matter of putting it all in the div or container that you would like applying the css and adjusting the margin and padding to your specific needs. &nbsp;]]></summary>
           <author>
             <name>Kristen</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-design-articles/layer_flash_under_html.html#comment-543</uri>
           </author>
        <category term="Website Designer Articles" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="flash" label="flash" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Kristen <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-design-articles/layer_flash_under_html.html#comment-543">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-design-articles/layer_flash_under_html.html#comment-543">Layer Flash Under HTML</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>kcollins commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/659</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-542" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-07-26T21:12:31Z</published>
           <updated>2011-07-26T21:12:31Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>kcollins</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-542</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[kcollins <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-542">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-542">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>card commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/658</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-541" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2011-07-23T20:26:48Z</published>
           <updated>2011-07-23T20:26:48Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>card</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-541</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[card <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-541">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-541">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Eli commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/657</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-540" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-07-13T10:36:50Z</published>
           <updated>2011-07-13T10:36:50Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Eli</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-540</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Eli <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-540">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-540">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Eli commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/656</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-539" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-07-13T10:36:20Z</published>
           <updated>2011-07-13T10:36:20Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Eli</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-539</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Eli <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-539">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-539">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>dogboy commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/655</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-538" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-06-26T12:39:28Z</published>
           <updated>2011-06-26T12:39:28Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>dogboy</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-538</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[dogboy <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-538">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-538">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Cheryl commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/654</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-537" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-06-10T21:42:48Z</published>
           <updated>2011-06-10T21:42:48Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Cheryl</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-537</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Cheryl <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-537">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-537">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Cheryl commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/653</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-536" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-06-10T21:42:17Z</published>
           <updated>2011-06-10T21:42:17Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Cheryl</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-536</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Cheryl <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-536">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-536">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Cheryl commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/652</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-535" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-06-10T21:41:46Z</published>
           <updated>2011-06-10T21:41:46Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Cheryl</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-535</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Cheryl <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-535">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-535">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>sho commented on Image Menu with Jquery</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/650</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-533" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.101</entryid>
           <published>2011-06-01T18:02:23Z</published>
           <updated>2011-06-01T18:02:23Z</updated>
           <summary><![CDATA[Creating a Smooth Image Menu with Jquery

I have always thought that imagemenu sliding effect is really cool and that it would be  nice if it worked with jQuery. Introducing a Mootools image menu ported to Jquery. If you have ever seen the image menu javascript for mootools by phatfusion  and liked what you saw well here is a Sliding Image Menu alternative I've come up with using the power of  jquery javascript.
Functionality Checklist for our Sliding Image Menu for Jquery.
Here is what we need our Jquery horizontal sliding image menu to do:

  Jquery compatible script.
  Mootools like sliding effect.
  Valid XHTML degrades well.
  Lightweight customizable script.

For this Image Menu we will be using jQuery and jquery-easing effects. I ended up adapting two versions of the image menu and will start with the more basic and straightforward one first.

For the purposes of helping visualize this demo I am using the same images found in the original Mootools ImageMenu.
Let's take a look at  the XHTML, CSS, and JavaScript that makes it all work.
Jquery Image Menu Version 1, View Demo, Download Source.


Here is the HTML for just the jquery Image Menu itself:


&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li class="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li class="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li class="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li class="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;


Here is The CSS

  View CSS...


  .jimgMenu {
	position: relative;
	width: 670px;
	height: 200px;
	overflow: hidden;
	margin: 25px 0px 0px;
}

.jimgMenu ul {
	list-style: none;
	margin: 0px;
	display: block;
	height: 200px;
	width: 1340px;
	
	}

.jimgMenu ul li {
	float: left;
}

.jimgMenu ul li a {
	text-indent: -1000px;
	background:#FFFFFF none repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow:hidden;
	width:78px;
	height: 200px;
}

.jimgMenu ul li.landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%;
}

.jimgMenu ul li.people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li.nature a {
	background: url(images/nature.jpg) repeat scroll 0%;
}
.jimgMenu ul li.abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}

.jimgMenu ul li.urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	min-width:310px;
	
}



The JavaScript
In the header section of your HTML file, you'll need to include jQuery and all the plug in files listed. The bare minimum setup look like this:
&lt;link href="css/jimgMenu.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;



Finally include the jquery in your page or in an attached file.
  &lt;script type="text/javascript"&gt;
$(document).ready(function () {
  // find the elements to be eased and hook the hover event
  $('div.jimgMenu ul li a').hover(function() {    
    // if the element is currently being animated
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"});
    } else {
      // ease in quickly
      $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"});
    }
  }, function () {
    // on hovering out, ease the element out
    if ($(this).is(':animated')) {
      $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"})
    } else {
      // ease out slowly
      $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"});
    }
  });
});
&lt;/script&gt;
  
  
This will activate our image menu, just remember we have css controlling most of the image menus style. You can customize the easing type and duration with the jquery easing plugin that we are using to achieve different slide effects.
Jquery Image Menu Version 2, View Demo, Download Source.
 

For this second version I have used kwicks to help with the ImageMenu animation. The advantage to using kwicks with our sliding image menu is the additional functionality that it brings in the form of sticky menu items which will stay open and custom events such as on click actions instead of hover.
The HTML remains the same for this version of jquery Image Menu except for the use of id instead of class.

&lt;div class="jimgMenu"&gt;
  &lt;ul&gt;
    &lt;li id="landscapes"&gt;&lt;a href="#"&gt;Landscapes&lt;/a&gt;&lt;/li&gt;
    &lt;li id="people"&gt;&lt;a href="#"&gt;People&lt;/a&gt;&lt;/li&gt;
    &lt;li id="nature"&gt;&lt;a href="#"&gt;Nature&lt;/a&gt;&lt;/li&gt;
    &lt;li id="abstract"&gt;&lt;a href="#"&gt;Abstract&lt;/a&gt;&lt;/li&gt;
    &lt;li id="urban"&gt;&lt;a href="#"&gt;Urban&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;



The CSS is adapted slightly for kwicks

  .jimgMenu {
	position:relative;
	margin: 0px 0px 0px 50px;
	padding: 0px;
	width:475px;
	height:200px;
	overflow: hidden;
}
.jimgMenu ul {
	list-style: none;
	margin: 0px;
	padding: 0px;
	display: block;
	height: 200px;
	position: relative;
	}	
.jimgMenu ul li {
	width: 95px;
	float: left;
	display: block;
	overflow: hidden;
}
.jimgMenu ul li a {
	text-indent: -1000px;
	background:#fff repeat scroll 0%;
	border-right: 2px solid #fff;
	cursor:pointer;
	display:block;
	overflow: hidden;
	height: 200px;
}
.jimgMenu ul li#landscapes a {
	background: url(images/landscapes.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#people a {
	background: url(images/people.jpg) repeat scroll 0%;
}

.jimgMenu ul li#nature a {
	background: url(images/nature.jpg) repeat scroll 0%; 
}
.jimgMenu ul li#abstract a {
	background: url(images/abstract.jpg) repeat scroll 0%;
}
.jimgMenu ul li#urban a {
	background: url(images/urban.jpg) repeat scroll 0%;
	border-right-style: none;
}


The JavaScript
In the header section of your HTML, you will need to include jQuery and all the files below. The bare minimum setup will look like this:
&lt;link href="css/jimgMenukwicks.css" rel="stylesheet" type="text/css" /&gt;
&lt;script type="text/javascript" src="js/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-1.3.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="js/jquery.kwicks-1.5.1.pack.js"&gt;&lt;/script&gt;


This will activate our jQuery Sliding Image Menu plug-in. The last step is to include the script in our page by placing this script in your html head or document body.
&lt;script type="text/javascript"&gt;
$().ready(function() {
	$('.jimgMenu ul').kwicks({max: 310, duration: 300, easing: 'easeOutQuad', complete: 'callback'});
	});
&lt;/script&gt;



Enjoy an Image Menu sliding effect for Jquery.]]></summary>
           <author>
             <name>sho</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-533</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[sho <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-533">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/create_image_menu_with_jquery.html#comment-533">Image Menu with Jquery</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>LenP commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/647</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-530" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-04-28T18:49:40Z</published>
           <updated>2011-04-28T18:49:40Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>LenP</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-530</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[LenP <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-530">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-530">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
      
     <entry>
      
        <title>Iain Young commented on Easy Jquery Auto Image Rotator</title>
        <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html" />        
        <id>tag:www.alohatechsupport.net,2013:/webdesignmaui/1/actionstreams/646</id>
          
           <link rel="alternate" type="text/html" href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-529" />
          
           <entryid>tag:www.alohatechsupport.net,2009:/webdesignmaui//1.169</entryid>
           <published>2011-04-28T09:01:31Z</published>
           <updated>2011-04-28T09:01:31Z</updated>
           <summary><![CDATA[Easy Jquery Image Rotator

The other week I had a friend ask me for a simple script to rotate a few  images on his web page. Sounded simple and I even assumed I would not have to re-invent the wheel, but after an hour of searching for a lightweight script I was surprised to find that unless you were willing to install rather large plug-ins along with jquery there were not allot of options for the simple rotation of images except out-dated scripts. So I decided to come up with my own image rotator that uses jquery's already built in effects.
Jquery Image Rotator Functionality Checklist.
What we need our Jquery image rotator to do:

  Rotate Images with Links.
  Valid XHTML.
  Lightweight Script.

The Rotator as I have come to call it will simply auto rotate through a list of images with a smooth fade effect without the need to include an extra plug-in on top of Jquery.
Let's look at  the XHTML, CSS, and Jquery Javascript that makes it work.
Jquery Image Rotator, View Demo, Download Source.


The HTML for our jquery image rotator gets placed in the body of your page.

&lt;div class="rotator"&gt;
  &lt;ul&gt;
    &lt;li class="show"&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-1.jpg" width="500" height="313"  alt="pic1" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-2.jpg" width="500" height="313"  alt="pic2" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-3.jpg" width="500" height="313"  alt="pic3" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;
    &lt;a href="javascript:void(0)"&gt;
    &lt;img src="images/image-4.jpg" width="500" height="313"  alt="pic4" /&gt;
    &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;

The CSS
  /* rotator in-page placement */
        div.rotator {
	position:relative;
	height:345px;
	margin-left: 15px;
}
/* rotator css */
	div.rotator ul li {
	float:left;
	position:absolute;
	list-style: none;
}
/* rotator image style */	
	div.rotator ul li img {
	border:1px solid #ccc;
	padding: 4px;
	background: #FFF;
}
        div.rotator ul li.show {
	z-index:500;
}


The JavaScript

Include jquery and the below script in your page or in an attached file.
&lt;script type="text/javascript"&gt;

function theRotator() {
	//Set the opacity of all images to 0
	$('div.rotator ul li').css({opacity: 0.0});
	
	//Get the first image and display it (gets set to full opacity)
	$('div.rotator ul li:first').css({opacity: 1.0});
		
	//Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds
	
	setInterval('rotate()',6000);
	
}

function rotate() {	
	//Get the first image
	var current = ($('div.rotator ul li.show')?  $('div.rotator ul li.show') : $('div.rotator ul li:first'));

    if ( current.length == 0 ) current = $('div.rotator ul li:first');

	//Get next image, when it reaches the end, rotate it back to the first image
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.rotator ul li:first') :current.next()) : $('div.rotator ul li:first'));
	
	//Un-comment the 3 lines below to get the images in random order
	
	//var sibs = current.siblings();
        //var rndNum = Math.floor(Math.random() * sibs.length );
        //var next = $( sibs[ rndNum ] );
			

	//Set the fade in effect for the next image, the show class has higher z-index
	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 1000);

	//Hide the current image
	current.animate({opacity: 0.0}, 1000)
	.removeClass('show');
	
};



$(document).ready(function() {		
	//Load the slideshow
	theRotator();
	$('div.rotator').fadeIn(1000);
    $('div.rotator ul li').fadeIn(1000); // tweek for IE
});

&lt;/script&gt;
  
  
To activate  jquery image rotator place the above code in your page head or an attached file. You can adjust the time before the next image appears by altering the setInterval value as well as the fade time itself by changing the animate duration.]]></summary>
           <author>
             <name>Iain Young</name>
             <uri>http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-529</uri>
           </author>
        <category term="Design Tips &amp; Techniques" scheme="http://www.sixapart.com/ns/types#category" />
        <category term="design" label="design" scheme="http://www.sixapart.com/ns/types#tag" /><category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" /><category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" /><category term="jquery" label="jquery" scheme="http://www.sixapart.com/ns/types#tag" /><category term="web" label="web" scheme="http://www.sixapart.com/ns/types#tag" /> 
        
        <content type="html" xml:lang="en" xml:base="http://www.alohatechsupport.net/webdesignmaui/">
            <![CDATA[Iain Young <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-529">commented</a> on <a href="http://www.alohatechsupport.net/webdesignmaui/maui-web-site-design/easy_jquery_auto_image_rotator.html#comment-529">Easy Jquery Auto Image Rotator</a>]]>
        </content>
       
    </entry>
   
</feed> 

