35 lines
834 B
JavaScript
35 lines
834 B
JavaScript
|
||
//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();
|
||
}
|
||
);
|
||
}
|
||
}
|