use of $link.attr('href') in IE

use of $link.attr('href') in IE

Hey all,

Well... I'm stuck, IE7 doesn't do what I want it to do (surprise, surprise).

Please have a look at this page:
http://www.laisserfaire.be/elementzoo/nieuws/

In Firefox, or IE8, the navigation at the left works perfectly, but nothing happens when I use the navigation in IE7.

My gut feeling says that something goes wrong in this part

$(function()
    {
        $('.myLink').click( function(ev){
            //prevent the default action of the event, this will stop the href in the anchor being followed
            //before the animation has started, u can also use return false;
            ev.preventDefault();
            //store a referene to the anchor tag
            var $self=$('div#first');
            var $link=$('.myLink');
            //get the image and animate
         $(".fade").animate({opacity: 1.0}, 10).fadeOut("fast");
            ($self).animate( {height:"0px"}, "slow", function(){
            jQuery.easing.def = 'easeOutQuad';
                //now get the anchor href and redirect the browser
                document.location = $link.attr('href');
            });
        });
    });


Any ideas? Thanks in advance.
    • Topic Participants

    • yves