Advice on a jquery slider please?
I have done this tutorial over four times today.
see nothing wrong, would a local expert please take a look and tell me where I am off?
Thank you!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>slideTest</title>
<style type="text/css">
.slider {
height: 300px;
width: 500px;
overflow: hidden;
background-image: url(slider/logoSlider.png);
background-repeat: no-repeat;
background-position: center center;
}
.slider img {
height: 300px;
width: 500px;
display: none;
margin: 0px;
padding: 0px;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js"> </script>
<script type="text/javascript" >
function slider (){
$(".slider#1").show("fade",500);
$(".slider#1").delay(5500).hide("slide",{direction: 'left'},500);
var sc=$(".slider img").size();
var count=2;
setInterval (function(){
$(".slider#"+count).show("slide",{direction: 'right'},500);
$(".slider#"+count).delay(5500).hide("slide",{direction: 'left'},500);
if (count == sc){
count =1}else{
count = count +1;
}
},6500);
}
</script>
</head>
<body onload="slider();">
<div class="slider">
<img id="1" src="slider/img01a.jpg" alt="rescueImg01" />
<img id="2" src="slider/img01.jpg" />
<img id="3"src="slider/img02.jpg" />
<img id="4" src="slider/img03.jpg" />
<img id="5"src="slider/img04.jpg" />
</div>
</body>
</html>