Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/05/2015, 21:46
helion
 
Fecha de Ingreso: mayo-2010
Mensajes: 215
Antigüedad: 14 años
Puntos: 4
Pregunta problemas con animate jquery

Hola amigos quisiera porfavor su ayuda, veran tengo este pequeño cuadro que al hacer click ... agranda el cuadro(hasta ahi todo bien), el detalle es de que cuando quiero achicar el cuadro, lo hace pero inmediatamente lo vuelve agrandar :/ alguien me puede ayudar....


Código HTML:
<style>
#index-navegation-moduleG{position:fixed;bottom:0px;right:0px;background-color:rgba(51,51,51,1);z-index:9999;width:50px;height:50px;overflow: hidden;}
#index-navegation-module-expandir{position:absolute;top:0px;right:24px;font-family: calibri;font-size: 15px;background-color:rgba(0,102,0,1);color:white;padding:6px;transition:200ms;cursor:pointer;width:15px;text-align:center;}
#index-navegation-module-expandir:hover{background-color:rgba(0,204,0,1);}
</style>
<script>
var og=0;
function navegation_module_exp(){
	if(og==1){
		og=0,$( "#index-navegation-moduleG" ).animate({'width': '350px','height': '200px',}, 300 );
		
	}
	if(og==0){
		og=1,$( "#index-navegation-moduleG" ).animate({'width': '450px','height': '300px',}, 300 );
		
	}
}
</script>
<div id="index-navegation-moduleG">
	<div id="index-navegation-module-expandir" onClick="navegation_module_exp()">[&nbsp;&nbsp;]</div>
</div>