【发布时间】:2014-10-21 11:45:24
【问题描述】:
我需要一些帮助。我正在尝试制作要在新标签中打开的图像(ad1.jpg)链接网址。我该怎么做?我已经尝试了很多选择来完成这项工作。我可能把代码放错了,但我已经尝试过 window.open 和更多选项。任何帮助是极大的赞赏。谢谢
(function($){
$(window).load(function(){
if(jQuery.isFunction(jQuery.fn.prettyPhoto)) {
$.prettyPhoto.open(
"images/ad1.jpg", // Image to be opened
"title", // Title of the pop-up
"desc." // The description
);
setTimeout(function() {
$.prettyPhoto.close();
}, 10000); // autoclose after 10 seconds
} else {
console.log("PrettyPhoto is not defined."); // log this message
}
});
})(jQuery);
【问题讨论】:
标签: javascript jquery prettyphoto