JQuery: animate () not working in IE

I'm going crazy with this IE 7 ...

==> hhttp: //neu.emergent-innovation.com/

Why is the following function not working in IE 7 but fine with Firefox? Is there an error in the animation function?

function accordion_starting_page(){
    // hide all elements except the first one
    $('#FCE-Inhalt02-ContentWrapper .FCE-Fade:not(:first)').css("height", "0").hide();
    $('#FCE-Inhalt02-ContentWrapper .FCE-Fade:first').addClass("isVisible");

    $('div.FCE-Title').click(function(){

        // if user clicks on an already opened element => do nothing
        if (parseFloat($(this).next('.FCE-Fade').css("height")) > 0) {
            return false;
        }

        var toHide = $(this).siblings('.FCE-Fade.isVisible');

        toHide.removeClass("isVisible");

        // close all opened siblings
        toHide.animate({"height": "0", "display": "none"}, 1000);

        $(this).next('.FCE-Fade').addClass("isVisible").animate({"height" : "200"}, 1000);

        return false;
    });
}

Thank you very much for your help...


Thanks so much, these were great tips! Unfortunately, it still does not work ...

The problem is that IE shows the contents of both containers until the animation ends ... Firefox behaves correctly ... I thought this was an overflow: hidden thing - but that didn't change anything.

I already tried the accordion plugin, but it behaves exactly the same ...

+5
source share
8 answers

, . () jQuery IE7 "". ,

CSS:

li p (bottom:-178px; color: white; background-color: # 4d4d4d; height: 100%; padding: 30px 10px 0 10px;)

jQuery:

$('li').hover(function(){

              $this = $(this);

              var bottom = '-45px'; //valor default para subir.

              if( $this.css('height') == '320px' ){bottom = '-115px';}

              $this.css('cursor', 'pointer').find('p').stop().find('.first').hide().end().animate({bottom: bottom}, {queue:false, duration:300});

      }, function(){

         var $this = $(this);

         var bottom = '-178px'; //valor default para descer

            if( $this.css('height') == '320px' ){bottom = '-432px';}

         $this.find('p').stop().animate({***position: 'absolute'***, bottom:bottom}, {queue:false, duration:300}).find('.first').show();

      });//fim do hover()

:

CSS:

li p (position: absolute; left: 0; bottom:-178px; color: white; background-color: # 4d4d4d; height: 100%; padding: 30px 10px 0 10px;)

JQuery:

   $('li').hover(function(){

                 $this = $(this);

         var bottom = '-45px'; //valor default para subir.

              if( $this.css('height') == '320px' ){bottom = '-115px';}

              $this.css('cursor', 'pointer').find('p').stop().find('.first').hide().end().animate({bottom: bottom}, {queue:false, duration:300});

      }, function(){

         var $this = $(this);

         var bottom = '-178px'; //valor default para descer

            if( $this.css('height') == '320px' ){bottom = '-432px';}

         $this.find('p').stop().animate({bottom:bottom}, {queue:false, duration:300}).find('.first').show();

      });//fim do hover()

.

+1

animate , , jQuery. jQuery , IE .

IE , CSS , . Safari.

, div ,

JQuery

var re = /px/;
var currentLeft = $("#mydiv").css('left').replace(re,'') - 0;
$("#mydiv").css('left',(currentLeft-20)+'px');

CSS

#mydiv { position: absolute;    top: 0;    left: 0; }

, IE .

,

+8

IE , , JQuery , :

:

$('#bs1').animate({
    "left": bs1x
}, 300, function() {
    // Animation complete.
});

JQuery: https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js

: https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js

hooray !

+1

, ... , "display: none"? :

toHide.animate({ height : 0 }, 1000, function() { $(this).hide(); });

... , , , overflow: hidden.

: jQuery UI . http://docs.jquery.com/UI/Accordion , , .

0

jQuery: , isVisible.

, slideUp (1000).

0

, animate() , , IE, css: - FireFox.

, , , css; IE-.

0

IE. 1/10, FF, :

FF

$("#map").animate({"top": (pageY - 101) + "px"},{"easing" : "linear", "duration" : 200});

IE

$("#map").animate({"top": (pageY - 101) + "px"},{"easing" : "linear", "duration" : 20});

.

0

, JQuery , Javascript. , IE 7 IE 8 const. Thats, JQuery . , - . , , ol AS3 Flex..

http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/JSConstKeyword.html

0

All Articles