Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animate opacity doesn't work properly on IE

I'm trying to use animate() to change the height and opacity of a div. The div has an image background in CSS. It works fine on Firefox and Safari, but when I test it in IE the background is being removed. This is my code:

if (jQuery.support.opacity) {     jQuery('#list_box').animate({opacity: '1',height: '300px',top: newTop},{duration: 300}); } else {     jQuery('#list_box').animate({filter: 'alpha(opacity=100)',height: '300px',top: newTop},{duration: 300}); } 

How can I fix this problem?

like image 373
fidoboy Avatar asked Sep 03 '09 20:09

fidoboy


1 Answers

I was under the impression that jQuery did the whole opacity support thing for you. Does this work for all browsers?

$('#list_box').animate({opacity: '1',height: '300px',top: newTop},{duration: 300}); 
like image 136
Eric Avatar answered Sep 20 '22 05:09

Eric