javascript - Custom video-js width and height on Dynamically Loaded Content -


i'm dynamically loading video-js inside foundation reveal, , have trigger width , height each time loads. odd thing is, once i've loaded 1 video on page, won't change again no matter what, sticks 1 size.

this code

    $(document).on('opened.fndtn', '[data-reveal]', function () {         if($('.sd-video').length) {             console.log('sd detected');             videojs($('.sd-video')[0], {"width": 640,"height": 480}, function() {});         }         if($('.hd-video').length) {             console.log('hd detected');             videojs($('.hd-video')[0], {"width": 1287,"height": 720}, function() {});         }     });     $(document).on('closed.fndtn', '[data-reveal]', function () {         $('#'+$(this).attr('id')).html('');     }); 

and no matter try, once it's loaded hd, sd not resize, , vice-versa. ideas?


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -