CeramicProject/newyt/Js/yanue.pop.js

35 lines
834 B
JavaScript
Raw Normal View History

2024-05-18 15:28:29 +08:00

//pop右下角弹窗函数
//作者yanue
function Pop(title, url, intro) {
this.title = title;
this.url = url;
this.intro = intro;
this.apearTime = 1000;
this.hideTime = 500;
this.delay = 10000;
//添加信息
this.addInfo();
//显示
this.showDiv();
//关闭
this.closeDiv();
}
Pop.prototype = {
addInfo: function () {
$("#popTitle a").attr('href', this.url).html(this.title);
$("#popIntro").html(this.intro);
$("#popMore a").attr('href', this.url);
},
showDiv: function (time) {
// $('#pop').slideDown(this.apearTime).delay(this.delay).fadeOut(400);
$('#pop').slideDown(this.apearTime);
},
closeDiv: function () {
$("#popClose").click(function () {
$('#pop').hide();
}
);
}
}