Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/09/2014, 07:05
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 2 meses
Puntos: 574
Respuesta: ¿Onclick con doble función?

Mira si te sirve esto

Código Javascript:
Ver original
  1. var posicion=document.getElementById('contenido').style.right;
  2. function mostrarEsconderMenu(){
  3.     if(posicion==' 0px'){
  4.         document.getElementById('contenido').style.right='-150px';
  5.     }else{
  6.         document.getElementById('contenido').style.right=' 0px';
  7.     }
  8.     posicion=document.getElementById('contenido').style.right;
  9. }

var posicion=document.getElementById('contenido').styl e.right;

debería estar despues de 'contenido'
__________________
Quim
--------------------------------------------------
Ayudar a ayudar es una buena práctica!!! Y da buenos resultados.