Reputation: 49
I have a function that works fine and videos are played properly but these videos are shown in a single line but I want one video in one line and all the videos should have same width and height.
function appendReturnedVideos(data) {
var $html = $();
$.each(data.videos, function(index, element) {
$html = $html.add($("<video/>", {
height: 360,
css: { 'max-width': 480},
src: element,
controls: true,
preload: 'auto'
}));
$("#videos").append($html);
});
}
HTML part:
<div class="container-fluid" id="myElement">
<div id="videos"> </div>
</div>`
Upvotes: 0
Views: 33