Hello friends I need to alternate 2 div, which are to change the format of a video without reloading the page
The problem of the div I solved it like this:
<script type="text/javascript">
function cambiaVisibilidad() {
var div1 = document.getElementById('precio1');
var div2 = document.getElementById('precio2');
if(div2.style.display == 'block'){
div2.style.display = 'none';
div1.style.display = 'block';
}else{
div2.style.display = 'block';
div1.style.display = 'none';
}
}
</script>
<div class="show" id="precio1">
<div class="video" align="center" >
<ul>
<p class="textocomentarios">Transmisión de La Plata - <?php echo"$AgradLP";?> </p>
<iframe width="660" height="390" align= "center" src="<?php echo"$LinkLP";?>" scrolling="no" frameborder="1" border="0" >Tu navegador no soporta frames!! actualiza tu Navegador</iframe>
</ul>
</div>
</div>
<div style="display:none;" id="precio2">
<div class="video1" align="center" >
<ul>
<p class="textocomentarios">Transmisión de La Plata - <?php echo"$AgradLP";?> </p>
<iframe width="660" height="390" align= "center" src="<?php echo"$LinkLP";?>" scrolling="no" frameborder="1" border="0" >Tu navegador no soporta frames!! actualiza tu Navegador</iframe>
</ul>
</div>
</div>
<div class="btn" align="center" onclick="cambiaVisibilidad()"><a id="accionar">Cambiar Tamaño de la Transmisión</a> </div>
but the problem that I have if the video is running, when changing the size while I watch the video in the new format the other one keeps running back