Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript what’s wron in the code

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37276
    matthewb
    Member

    Is this the correct code

    $("#slider_tabs li").click(function(){

    if ($("#slider_tabs li").eq(0)){
    $("#banner1").css("display","block");
    }
    else if ($("#slider_tabs li").eq(1)){
    $("#banner2").css("display","block");
    }
    else if($("#slider_tabs li").eq(2)){
    $("#banner3").css("display","block");
    }
    else if($("#slider_tabs li").eq(3)){
    $("#banner4").css("display","block");
    }
    else ($("#slider_tabs li").eq(4)){
    $("#banner5").css("display","block");
    }

    });
Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.