animación en ie8

5 views
Skip to first unread message

Paco Garat

unread,
May 3, 2012, 10:27:24 AM5/3/12
to jquery-e...@googlegroups.com
Hola, estoy desarrollando un sitio en Joomla y estoy intentando hacer
que los artículos (divs) sean animados, además de animar la transición
entre ellos.

http://pacogarat.16mb.com

El problema es que en IE8 va muy lenta la animación, casi se puede
decir que no va! Si redimensiono la ventana del IE y hago que se
muestre solo un poco y lanzo la transición funciona fluida.

Estoy desesperado, alguien sabe que pasa?

Para el movimiento aleatorio de los elementos uso el plugin spRandom,
pero me interesa el tema de la transición entre diapositivas, debería
ser simple pero no lo consigo.

Saludos y gracias de antemano.

Podéis ver el DOM y el CSS en http://pacogarat.16mb.com con el firebug
o inspector de elementos, dejo los scripts aquí:



jQuery.noConflict();
jQuery(document).ready(function($){
	$().framerate({framerate: 120, logframes: false});

	//$('.items-leading').children('div').css('margin-right',
(window.innerWidth-900)+'px');
	$('div#pagina_actual').html('1');
	$('div.rand1_2').css('marginLeft','905px');
	$('div.items-leading').attr('id','leading');
	dirigible();
    $('a.pagingacion').click(function(){
    	margen=window.innerWidth-900;
    	if (margen<0){
    		margen=0;
    	}
    	//$('.items-leading').children('div').css('margin-right',margen
+'px');
    	var pagina_sig = $(this).html();

    	var a=pagina_sig;
    	a=(a-1)*(905);//+margen);
    	$('.rand1_2 img').animate({
		    'marginLeft': (-a)
		    }, 1000, 'easeOutCirc');
    	$('.rand img').animate({
		    'marginLeft': '-'+a
		    }, 1000, 'easeOutCirc');
    	$('#leading').animate({
    		    marginLeft: '-'+a
    			}, 1000, 'easeOutCirc');
    	$('.dirigible').animate({
    		    'marginLeft': '-'+a
    		    }, 1000, 'easeOutCirc');
    	$('div#pagina_actual').html(pagina_sig);
    	$(this).addClass('red');
    	$(this).siblings().removeClass('red');
    	if(pagina_sig==2) {
    		$('.rand1_2').show();
    		activar_diap1_2();
    	}else {
    		$('.rand1_2').hide();
    	}
    	});
    function dirigible(){
		    $('div#dirigible').spRandom({
		        top: 70,
		        left: 270,
		        right: 390,
		        bottom: 80,
		        speed: 8000,
		        pause: 00
		    });
		    $('div#nube1').spRandom({
		        top: 90,
		        left: 224,
		        right: 230,
		        bottom: 92,
		        speed: 1000,
		        pause: 100
		    }).active();

			$('div#nube2').spRandom({
		        top: 80,
		        left: 418,
		        right: 420,
		        bottom: 84,
		        speed: 1000,
		        pause: 400
		    }).active();
			$('div#nube3').spRandom({
		        top: 132,
		        left: 235,
		        right: 245,
		        bottom: 134,
		        speed: 1000,
		        pause: 200
		    }).active();
			$('div#nube4').spRandom({
		        top: 127,
		        left: 398,
		        right: 400,
		        bottom: 130,
		        speed: 1000,
		        pause: 300
		    }).active();


    };
    function activar_diap1_2(){
		$('div#cielo1').spRandom({
	        top: 280,
	        left: 725,
	        right: 735,
	        bottom: 300,
	        speed: 1000,
	        pause: 800
	    }).active();
		$('div#cielo2').spRandom({
			top: 190,
	        left: 330,
	        right: 350,
	        bottom: 210,
	        speed: 1000,
	        pause: 300
	    }).active();
		$('div#cielo3').spRandom({
			top: 239,
	        left: 52,
	        right: 72,
	        bottom: 259,
	        speed: 1000,
	        pause: 500
	    }).active();
		$('div#cielo4').spRandom({
			top: 350,
	        left: 402,
	        right: 422,
	        bottom: 370,
	        speed: 1000,
	        pause: 600
	    }).active();
		$('div#cielo5').spRandom({
			top: 418,
	        left: 492,
	        right: 512,
	        bottom: 428,
	        speed: 1000,
	        pause: 200

	    }).active();
    }
});

Paco Garat

unread,
May 3, 2012, 10:31:30 AM5/3/12
to jquery-e...@googlegroups.com
¿algún manual donde venga bien explicado cómo conseguir un mejor rendimiento en ie de las animaciones?,
saludos
Reply all
Reply to author
Forward
0 new messages