Forums

jguery ie6 problem in wordpress (2 posts)

  1. lassepappa
    Member
    Posted 2 years ago #

    Im getting some sort of conflict from wordpress with .animate in jguery in IE 6

    i have a working example here:
    http://studiokrukmakargatan.se/skmg/

    but when implemented in wordpress it stops working in IE6

    here:
    http://studiokrukmakargatan.se/

    Have spent quite a few hours googling for an explanation with no luck.

    thankful for assistance /lassepappa

  2. lassepappa
    Member
    Posted 2 years ago #

    to clearify
    the script works with show hide and fade in out but not the move part.
    the script is as follows.`
    $(document).ready(function() { //Flyttar menyn till mitten
    menu_pos = document.documentElement.clientWidth / 2 - $('#menu') .width()/2;
    //alert (menu_pos);
    //alert ($('#menu') .width());
    $('#div1').stop().animate({top:'0px', left:'0px','width':'120px'},500);
    $('#div2').stop().animate({top:'0px', left:'0px','width':'120px'},500);
    $('#div3').stop().animate({top:'0px', left:'0px','width':'120px'},500);
    $('#div4').stop().animate({top:'0px', left:'0px','width':'120px'},500,function() { menu_pos = document.documentElement.clientWidth / 2 - $('#menu') .width()/2 + 25; $('#menu').animate({left: +menu_pos},500);});
    });

    function animeraDiv(obj){
    div_pos = +menu_pos - $('#'+obj) .width();
    if(($('#div1').css('top')>'0')||($('#div2').css('top')>'0')||($('#div3').css('top')>'0')||($('#div4').css('top')>'0')){
    //$('#menu').animate({bottom:'0px'},200); //Sätter meny divven i rätt nivå
    $('#div1').stop().animate({top:'0px',left:'0px','width':'120px'},500);
    $('#div2').stop().animate({top:'0px',left:'0px','width':'120px'},500);
    $('#div3').stop().animate({top:'0px',left:'0px','width':'120px'},500);
    $('#div4').stop().animate({top:'0px',left:'0px','width':'120px'},500,function() { menu_pos = document.documentElement.clientWidth / 2 - $('#menu') .width()/2 + 25; $('#menu').animate({left: +menu_pos},500);});
    $('#menu p').fadeOut(400);
    $('#menu span').fadeIn(500);

    }
    if($('#'+obj).css('top')<'100'){
    $('#menu').stop().animate({'top':'0px'},200);//Sätter meny divven i rätt nivå
    $('#'+obj).stop().animate({'top':'100px','left':'0px','width':'300px'},500,function() { menu_pos = document.documentElement.clientWidth / 2 - $('#menu') .width()/2 + 25; $('#menu').animate({left: +menu_pos},500);});
    $('#'+obj+' span').fadeOut(500);
    $('#'+obj+' p').fadeIn(1000);

    //$('#'+obj'+'text).stop().animate({'top':'100px','left':'0px','width':'300px'},500);
    } else {
    $('#menu').stop().animate({'top':'0px'},200); //Sätter meny divven i rätt nivå
    $('#'+obj).stop().animate({'top':'0px', 'left':'0px','width':'120px'},500,function() { menu_pos = document.documentElement.clientWidth / 2 - $('#menu') .width()/2 + 25; $('#menu').animate({left: +menu_pos},500);});
    $('#'+obj+' p').fadeOut(400);
    $('#'+obj+' span').fadeIn(500);

    }
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags