Image rotator question

Image rotator question

Hi,

I have been trying to complete an image rotator tutorial from the Learning jQuery 1.3 book but haven't been able to get past a fairly early step and am wondering if it is because I am using jQuery 1.4.2 or if I have just made a mistake in transcribing the code (I've checked, and for the life of me, I don't see it but stranger things have happened...)

I've looked at it in Safari and Firefox and neither shows it working...

Here is the code:

  1. $(document).ready(function() {
  2.     var spacing = 220;
  3.     $('#featured-books').css({
  4.         'width' : spacing * 3,
  5.         'height' : '220px',
  6.         'overflow' : 'hidden'
  7.     }).find('.covers').css({
  8.         'float' : 'none',
  9.         'position' : 'absolute',
  10.         'left' : 1000,
  11.         'overflow' : 'hidden'
  12.     });
  13.     var setUpCovers = function(){
  14.         var $covers = $('#featured-books .covers a');
  15.         $covers.unbind('click');
  16.         //Left image; scroll right (to view images on the left)
  17.             $covers.eq(0).css({'left' : 0}).bind('click', function(event){
  18.                 $covers.eq(2).css({'left' : 1000});
  19.                 $covers.eq($covers.length - 1).prependTo('#featured-books .covers');
  20.                 setUpCovers();
  21.                 event.preventDefault();
  22.             });
  23.         //Right image; scroll left (to view images on the left)
  24.             $covers.eq(2).css({'left' : spacing * 2}).click(function(event){
  25.                 $covers.eq(0).css({'left' : 1000});
  26.                 $covers.eq(0).appendTo('#featured-books .covers');
  27.                 setUpCovers();
  28.                 event.preventDefault();
  29.             });
  30.         //Center image
  31.             $covers.eq(1).css({'left' : spacing});
  32.     };
  33.     setUpCovers();
  34. });
The html and css seem to work fine but I can post those as well if it is helpful.

Thanks very much!