CeramicProject/newyt/Js/yanue.pop.js

35 lines
834 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//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();
}
);
}
}