/*
* ie alert! jquery plugin
* version 1
* author: david nemes http://nmsdvid.com
* http://nmsdvid.com/iealert/
*/
(function($){
$("#goon").live("click", function(){
$("#ie-alert-overlay").hide();
$("#ie-alert-panel").hide();
});
function initialize($obj, support, title, text){
var panel = ""+ title +""
+ "
"+ text +"
"
+ ""
+ "
"
+ " "
+ " "
+ " "
+ " "
+ " "
+ "
";
var overlay = $("");
var iepanel = $(""+ panel +"
");
var docheight = $(document).height();
overlay.css("height", docheight + "px");
if (support === "ie8") { // shows the alert msg in ie8, ie7, ie6
if ($.browser.msie && parseint($.browser.version, 10) < 9) {
$obj.prepend(iepanel);
$obj.prepend(overlay);
}
if ($.browser.msie && parseint($.browser.version, 10) === 6) {
$("#ie-alert-panel").css("background-position","-626px -116px");
$obj.css("margin","0");
}
} else if (support === "ie7") { // shows the alert msg in ie7, ie6
if ($.browser.msie && parseint($.browser.version, 10) < 8) {
$obj.prepend(iepanel);
$obj.prepend(overlay);
}
if ($.browser.msie && parseint($.browser.version, 10) === 6) {
$("#ie-alert-panel").css("background-position","-626px -116px");
$obj.css("margin","0");
}
} else if (support === "ie6") { // shows the alert msg only in ie6
if ($.browser.msie && parseint($.browser.version, 10) < 7) {
$obj.prepend(iepanel);
$obj.prepend(overlay);
$("#ie-alert-panel").css("background-position","-626px -116px");
$obj.css("margin","0");
}
}
}; //end initialize function
$.fn.iealert = function(options){
var defaults = {
support: "ie7", // ie8 (ie6,ie7,ie8), ie7 (ie6,ie7), ie6 (ie6)
title: "\u4f60\u77e5\u9053\u4f60\u7684internet explorer\u662f\u8fc7\u65f6\u4e86\u5417?", // title text
text: "\u4e3a\u4e86\u5f97\u5230\u6211\u4eec\u7f51\u7ad9\u6700\u597d\u7684\u4f53\u9a8c\u6548\u679c,\u6211\u4eec\u5efa\u8bae\u60a8\u5347\u7ea7\u5230\u6700\u65b0\u7248\u672c\u7684internet explorer\u6216\u9009\u62e9\u53e6\u4e00\u4e2aweb\u6d4f\u89c8\u5668.\u4e00\u4e2a\u5217\u8868\u6700\u6d41\u884c\u7684web\u6d4f\u89c8\u5668\u5728\u4e0b\u9762\u53ef\u4ee5\u627e\u5230.
>>>\u7ee7\u7eed\u8bbf\u95ee
"
};
var option = $.extend(defaults, options);
return this.each(function(){
if ( $.browser.msie ) {
var $this = $(this);
initialize($this, option.support, option.title, option.text);
} //if ie
});
};
})(jquery);