Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get my banner to automatically rotate please? 1

Status
Not open for further replies.

rubbershark

IS-IT--Management
Sep 28, 2011
1
GB
Hi guys, I have a home page banner which I'd like to automatically rotate. At the moment you can only change the image by clicking the tabs under the image. Here's the URL:


& here's my JS code:

$(document).ready(function() {

$(function() {$('#tabs_news').tabs({ fxFade: true, fxSpeed: 'fast' });});

$("ul.sf-menu").superfish({
autoArrows: false,
delay: 400, // one second delay on mouseout
animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation
speed: 'fast', // faster animation speed
autoArrows: false, // disable generation of arrow mark-up
dropShadows: false // disable drop shadows
});

$('ul.list li').each(function() {
var a = $(this).children('a');
var aClass = a.attr('rel');
if (a.hasClass('active')) {
$('.'+aClass).css({'display':'block'});
} else {
$('.'+aClass).css({'display':'none'});
}
});
$('ul.list li a').click(function () {
var thisaClass = $(this).attr('rel');
$(this).parent('li').parent('ul').children('li').each(function() {
var a = $(this).children('a');
var aClass = a.attr('rel');
if (thisaClass == aClass) {
$('.'+aClass).show();
a.attr('class','active');
} else {
$('.'+aClass).hide();
a.attr('class','');
}
});
return false;
});

// wrap 'span' to nav page link
$('.topnav ul').children('li').each(function() {
$(this).children('a').html('<span>'+$(this).children('a').text()+'</span>'); // add tags span to a href
});





});
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top