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>