我在Chrome開發者版上。圖書館沒有加載,我不明白爲什麼。該錯誤在Chrome控制檯中報告。這是我的代碼:
<ul><li><a class="mediaimage-link" href="~/img/HP/mediakit/The-CorPath-Vascular-Robotic-System_HR.jpg"><img src="~/img/HP/The-CorPath-Vascular Robotic-System-187.jpg" alt="">
</a></li>
<li><a href="https://www.youtube.com/watch?v=TnQsToiKKgw?rel=0&showinfo=0" class="popup-youtube"> <img src="~/img/HP/Iyer-Video-187.jpg" alt=""></a>
</li>
</ul>
$(document).ready(function() {
//Media Image Popup
$('.mediaimage-link').magnificPopup({type:'image'});
//Video Iframe Popup
$('.popup-youtube').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
});`
添加jquery文件 – Mahi
http://jsfiddle.net/t5f5e5zw/52/ – Mahi