html5 - jQuery .accordion() resizes weird with video tags inside -
i have div video tags inside , jquery has .accordion() on div. when click on 1 of other ones, resizes div inside full width split second , correct specified width. there fix this? example, when click on 'series 2' header, series 1 collapses should , when series 2 opens up, expands width of screen split second before going original width.
code:
<div id="accordion"> <h3 class="stitle">series 1</h3> <div class="viddiv> <h3 class="vidtitle">video 1</h3> <div class="inner"> <video controls preload="auto" width="600px" height="240px"> <source src="myvid1.mp4" type="video/mp4"> </video> </div> <h3 class="vidtitle">video 2</h3> <div class="inner"> <video controls preload="auto" width="600px" height="240px"> <source src="myvid2.mp4" type="video/mp4"> </video> </div> </div> <h3 class="stitle">series 2</h3> <div class="viddiv"> <h3 class="vidtitle">video 3</h3> <div class="inner"> <video controls preload="auto" width="600px" height="240px"> <source src="myvid3.mp4" type="video/mp4"> </video> </div> <h3 class="vidtitle">video 4</h3> <div class="inner"> <video controls preload="auto" width="600px" height="240px"> <source src="myvid4.mp4" type="video/mp4"> </video> </div> </div> </div> thanks!
may forgot include attribute heightstyle: "content"
$(function() { $( "#general" ).accordion({ heightstyle: "content" }); }); in accordian function, working example here jsfiddle
Comments
Post a Comment