|
发表于 2019-9-9 16:08:08
|
显示全部楼层
$(function () {
$('.mdui-list').on('click','li',function(){
var href = $(this).children('a').attr('href');
console.log(href);
if(href.lastIndexOf(".mp4") > -1) {
layer.open({
type: 1,
title: decodeURI(href.substring(href.lastIndexOf("/") + 1, href.length)),
shadeClose: true,
shade: 0.8,
area: ['100%', '100%'],
content: '<center><video controls autoplay=true preload=auto style="width:80%;object-fit: cover;" src="' + href + '"></video></center>'
});
return false;
}
});
}); |
|