开发者

For some reason, the jquery code is not working on my site under IE 8, but is giving off no errors

It's working fine under chrome, anyone have an idea on what tool I could use to check what is wrong? Or where to look?

This is the whole code if anyone is interested, but I doubt it would be of use.

 $(document).ready(function(){
    $('a').click(function(){
        $(this).blur();
    });
    $('.opcion').hover(function() {
        $(this).css('color','#FFF');
    },function(){
        $(this).css('color','rgb(200,200,200)');
    });
    $('body ul li').each(function(){
        var tamcompleto = $(this).height() + 'px';
        $(this).hover(
            function(){
                $(this).stop().animate({height:tamcompleto},{queue:false, duration:600, easing: 'easeOutBounce'});
            },
            function(){
                $(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'});
            }
        );
        $(this).css('height','50px');
    }); 
    $('.objeto').each( function(){
        $(this).click(function() {
            var center   = 'height=380,width=900,top='+((screen.width - 900)/2)+',left='+((screen.height - 380)/2);
            var address = $(this).attr('id');
            window.open (address,'Verarticulo', center); 
        });
        $(this).hover(function() {
            $(this).css('backgroundColor','rgb(255,122,79)');
        },function() {
            $(this).css('backgroundColor','rgb(200,200,200)');
        });
    });
    $('.elastica img').each(function(){
        $(this).css('width','100px');
        $(this).hover(function(){
            $(this).stop().animate({width: 200}, 150);
        },fu开发者_运维技巧nction(){
            $(this).stop().animate({width: 100}, 150);
        });
    });
    $('.elastica').click(function(){
         $('#imgampliada').attr('src', $(this).find('img').attr('src'));
    });
    $('.icon').each(function(){
        var newwidth = $(this).attr('data-width');
        var newposition = $(this).attr('data-position');
        $(this).find('img').hover(function(){
            $('#choice').html($(this).attr('id'));
            $('#choice').stop(false, true).animate({width: newwidth, left: newposition}, 200);
        })
    }); 
    $('#iconwrapper').mouseout(function(){
        $('#choice').html('');
        $('#choice').stop(false, true).animate({width: 0}, 100);
    });

});

Main suspect: Do custom data tags work under IE8?


You can use IE to debug, just hit F12 and select 'Script' in the debugger window


mouseover and mouseout could be replaced with hover()

$().hover(
    function(){
        //
    },
    function(){
        //
    }
);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜