Javascript 放大弹出窗口中的混合内容类型

Javascript 放大弹出窗口中的混合内容类型,javascript,jquery,magnific-popup,Javascript,Jquery,Magnific Popup,我正在尝试使用类似放大弹出窗口的混合内容类型lightbox gallery 这是我的密码 $(“.mixed type”)。在(“单击”,函数()上){ var data_type=$(this.attr(“数据类型”); $(“.mixed type”).magnificPopup({ 禁用日期:700, 类型:数据类型, 主类:“mfp淡入淡出”, 删除延迟:160, 预加载程序:false, fixedContentPos:true, 回调:{ beforeOpen:函数(){ thi

我正在尝试使用类似放大弹出窗口的混合内容类型lightbox gallery

这是我的密码

$(“.mixed type”)。在(“单击”,函数()上){
var data_type=$(this.attr(“数据类型”);
$(“.mixed type”).magnificPopup({
禁用日期:700,
类型:数据类型,
主类:“mfp淡入淡出”,
删除延迟:160,
预加载程序:false,
fixedContentPos:true,
回调:{
beforeOpen:函数(){
this.st.mainClass=this.st.el.attr(“数据类”)
}
}
});
});


您在上述代码片段中遗漏了document.ready函数。把你的代码包在里面

       $(document).ready(
        function() {
 //put your code here

        }); 

并在锚定标记中使用此href=”“data mfp src=“img/pic1.jpg”

您在上述代码片段中错过了document.ready函数。把你的代码包在里面

       $(document).ready(
        function() {
 //put your code here

        }); 

并在您的定位标记中使用此href=”“data mfp src=“img/pic1.jpg”

我已经包装了我的代码
$(function(){“use strict”;})我已经包装了我的代码
$(function(){“use strict”;})