Jquery image-scroller help needed

Jquery image-scroller help needed

Hello everybody
I am trying to implement the following image-scroller jquery technique

But for some reason it doesn't work, I compared my code against the demo 100 times, but everything is just the same. Could anybody please help me?

JS:
HTML Code:
<script type="text/javascript" src="/uploads/turizm/images/jquery-1.3.2.min.js"></script>

<script type="text/javascript">
$(function() ).width($(".wrapper").length * 170).height(170).appendTo("div#viewer");

//add images to container
$(".wrapper").each(function() );

//work out duration of anim based on number of images (1 second for each image)
var duration = $(".wrapper").length * 1000;

//store speed for later (distance / time)
var speed = (parseInt($("div#container").width()) + parseInt($("div#viewer").width())) / duration;

//set direction
var direction = "rtl";

//set initial position and class based on direction
(direction == "rtl") ? $("div#container").css("left", $("div#viewer").width()).addClass("rtl") : $("div#container").css("left", 0 - $("div#container").width()).addClass("ltr") ;

//animator function
var animator = function(el, time, dir) , time, "linear", function() );

//restart animation
animator($(this), duration, "rtl");

//hide controls if visible
($("div#controls").length > 0) ? $("div#controls").slideUp("slow").remove() : null ;

});
} else , time, "linear", function() );

//restart animation
animator($(this), duration, "ltr");

//hide controls if visible
($("div#controls").length > 0) ? $("div#controls").slideUp("slow").remove() : null ;
});
}
}

//start anim
animator($("div#container"), duration, direction);

//pause on mouseover
$("a.wrapper").live("mouseover", function() ).slideDown("slow") : null ;
($("a#rtl").length == 0) ? $("<a>").attr().appendTo("#controls") : null ;
($("a#ltr").length == 0) ? $("<a>").attr().appendTo("#controls") : null ;

//variable to hold trigger element
var title = $(this).attr("title");

//add p if doesn't exist, update it if it does
($("p#title").length == 0) ? $("<p>").attr("id", "title").text(title).appendTo("div#controls") : $("p#title").text(title) ;
});

//restart on mouseout
$("a.wrapper").live("mouseout", function(e) );

//handler for ltr button
$("#ltr").live("click", function() );

//handler for rtl button
$("#rtl").live("click", function() );
});
</script>
































































HTML:
HTML Code:
<div id="outerContainer">

<div id="imageScroller">

<div id="viewer" class="js-disabled">
<a class="wrapper" href="#" title="NYC"><img class="logo" id="NYC" src="uploads/turizm/images/nyc.jpg" alt="NYC"></a>
<a class="wrapper" href="#" title="Sydney"><img class="logo" id="Sydney" src="uploads/turizm/images/sydney.jpg" alt="Sydney"></a>
<a class="wrapper" href="#" title="Tokyo"><img class="logo" id="Tokyo" src="uploads/turizm/images/tokyo.jpg" alt="jQuery"></a>
<a class="wrapper" href="#" title="LDN"><img class="logo" id="LDN" src="uploads/turizm/images/england.jpg" alt="LDN"></a>
<a class="wrapper" href="#" title="Paris"><img class="logo" id="Paris" src="uploads/turizm/images/france.jpg" alt="Paris"></a>
</div>
</div>

</div>












Link:
http://turizmxxx.ru/







    • Topic Participants

    • kevin