views:

321

answers:

0

Hi,

I'm working on a site in hebrew (rtl) http://client.bearditch.com/bilderish/ and I'm using the jQuery plugin scrollTo for navigation.

The strange thing is that it works in FF, Safari and IE6 but it freezes inside IE8. The scroll is displayed correctly (set #wrapper to overflow:scroll) but it won't nudge.

Any ideas?

The js part is in behave.js, the "Passage" section

/*---------------------------------------------------
Passage
---------------------------------------------------*/
$.fn.passage = function () {
    return this.each(function () {

  var $links = $(this).find('a:not(.external)'),
   $nav = $(this);
   anchor = location.hash;

  $('#wrapper').scrollTo("#home", {axis: 'x'});
  if (anchor && anchor != 'home') travel($links.filter('.'+anchor.slice(1)));



  $links.click( function(event) {
   event.preventDefault();
   travel(this);
  });


  function travel(target) {


   var $dad = $(target).parent(),
    $current = $dad.siblings('.selected').eq(0);

   $nav.addClass('freezed');
   $current.removeClass("selected");
   $dad.addClass("selected");

   var where = $(target).attr("href");

   $('#wrapper').scrollTo(where, 1000, {
    axis: 'x',
    onAfter: function (){  $nav.removeClass('freezed'); /*location.hash = where;*/ }
   });


  }

    });  
};

$("#nav").passage();