Linked Questions

Popular Questions

links not woking in horizontal menus

Asked by At

My horizontal links are not working properly after adding an auto-slider using JQuery except aerospace and automotive. Add some more hyperlinks as I was unable to post more href links because of my reputation.

Below is my jquery code:

function slideSwitch() {
var $active = $('#slideshow IMG.active');

if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
var $next =  $active.next().length ? $active.next()
    : $('#slideshow IMG:first');
var $sibs  = $active.siblings();
var rndNum = Math.floor(Math.random() * $sibs.length );
var $next  = $( $sibs[ rndNum ] );
$active.addClass('last-active');
$next.css({opacity: 0.0})
    .addClass('active')
    .animate({opacity: 1.0}, 1000, function() {
        $active.removeClass('active last-active');
    });
}

$(function() {
setInterval( "slideSwitch()", 5000 );
}); 

Html:

<div id="hori">
   <ul>
      <li><a href="/home/adapco/Desktop/ksa1" target="name">Aerospace</a></li>
      <li><a href="/home/adapco/Desktop/ksa2.css" target="name">Automotive</a></li>
   </ul>
</div>

css:

#slideshow
{
position:relative;
height:500px;
right:-570px;
top:-350px
}

#slideshow img
{
position:absolute;
top:0;
left:0;
z-index:8;
}

#slideshow img.active
{
z-index:10;
}

#slideshow img.last-active
{
z-index:9;
}

check this link http://jsfiddle.net/KyRus/20/

Related Questions