Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/03/2015, 08:09
masiv0
 
Fecha de Ingreso: marzo-2015
Mensajes: 2
Antigüedad: 9 años, 1 mes
Puntos: 0
Pregunta grid con thumbnails de videos

hola gente, quiero mostrar un grid con videos (usando <video controls> en html5) y quiero que con un click se expanda y luego otro click le haga play y otro click lo vuelva a las propiedades del principio.

este es mi código:
Código HTML:
<html>
<head>

<script> 
$(document).ready(function(){

var open = false;
$( "video" ).attr("width", "150"); 
$( "video" ).attr("height", "80"); 
$( "video" ).click(function() 
    {
    if(open){
        $(this).attr("width","150");
        $(this).attr("height","80");
        open = false;
    }else{
        $(this).attr("width","500");
        $(this).attr("height","500");
        open = true;
    }
    }
);
};
</script>
</head>
<body>
<video id="video" src="1425857827826.avi" width="150" height="80" controls> </video> 
 


 </body>

</html>