晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
| DIR:/home/bolconlineco/public_html/aaaaaa/assets/plugins/jquery-notific8/ |
| Current File : //home/bolconlineco/public_html/aaaaaa/assets/plugins/jquery-notific8/jquery.notific8.js |
/**
* @author Will Steinmetz
*
* jQuery notification plug-in inspired by the notification style of Windows 8
*
* Copyright (c)2013, Will Steinmetz
* Licensed under the BSD license.
* http://opensource.org/licenses/BSD-3-Clause
*/
;(function($) {
var settings = {
life: 10000,
theme: 'teal',
sticky: false,
verticalEdge: 'right',
horizontalEdge: 'top',
zindex: 1100
};
var methods = {
init: function(message, options) {
return this.each(function() {
var $this = $(this),
data = $this.data('notific8');
$this.data('notific8', {
target: $this,
settings: {},
message: ""
});
data = $this.data('notific8');
data.message = message;
// apply the options
$.extend(data.settings, settings, options);
// add the notification to the stack
methods._buildNotification($this);
});
},
/**
* Destroy the notification
*/
destroy: function($this) {
var data = $this.data('notific8');
$(window).unbind('.notific8');
$this.removeData('notific8');
},
/**
* Build the notification and add it to the screen's stack
*/
_buildNotification: function($this) {
var data = $this.data('notific8'),
notification = $('<div />'),
num = Number($('body').attr('data-notific8s'));
num++;
notification.addClass('jquery-notific8-notification').addClass(data.settings.theme);
notification.attr('id', 'jquery-notific8-notification-' + num);
$('body').attr('data-notific8s', num);
// check for a heading
if (data.settings.hasOwnProperty('heading') && (typeof data.settings.heading == "string")) {
notification.append($('<div />').addClass('jquery-notific8-heading').html(data.settings.heading));
}
// check if the notification is supposed to be sticky
if (data.settings.sticky) {
var close = $('<div />').addClass('jquery-notific8-close-sticky').append(
$('<span />').html('close x')
);
close.click(function(event) {
notification.animate({width: 'hide'}, {
duration: 'fast',
complete: function() {
notification.remove();
}
});
});
notification.append(close);
notification.addClass('sticky');
}
// otherwise, put the normal close button up that is only display
// when the notification is hovered over
else {
var close = $('<div />').addClass('jquery-notific8-close').append(
$('<span />').html('X')
);
close.click(function(event) {
notification.animate({width: 'hide'}, {
duration: 'fast',
complete: function() {
notification.remove();
}
});
});
notification.append(close);
}
// add the message
notification.append($('<div />').addClass('jquery-notific8-message').html(data.message));
// add the notification to the stack
$('.jquery-notific8-container.' + data.settings.verticalEdge + '.' + data.settings.horizontalEdge).append(notification);
// slide the message onto the screen
notification.animate({width: 'show'}, {
duration: 'fast',
complete: function() {
if (!data.settings.sticky) {
(function(n, l) {
setTimeout(function() {
n.animate({width: 'hide'}, {
duration: 'fast',
complete: function() {
n.remove();
}
});
}, l);
})(notification, data.settings.life);
}
data.settings = {};
}
});
},
/**
* Set up the configuration settings
*/
configure: function(options) {
$.extend(settings, options);
},
/**
* Set up the z-index
*/
zindex: function(zindex) {
settings.zindex = zindex;
}
};
// wrapper since this plug-in is called without selecting an item first
$.notific8 = function(message, options) {
switch (message) {
case 'configure':
case 'config':
return methods.configure.apply(this, [options]);
break;
case 'zindex':
return methods.zindex.apply(this, [options]);
break;
default:
if (typeof options == 'undefined') {
options = {};
}
// make sure that the stack containers exist
if ($('.jquery-notific8-container').size() === 0) {
var $body = $('body');
$body.attr('data-notific8s', 0);
$body.append($('<div />').addClass('jquery-notific8-container').addClass('top').addClass('right'));
$body.append($('<div />').addClass('jquery-notific8-container').addClass('top').addClass('left'));
$body.append($('<div />').addClass('jquery-notific8-container').addClass('bottom').addClass('right'));
$body.append($('<div />').addClass('jquery-notific8-container').addClass('bottom').addClass('left'));
$('.jquery-notific8-container').css('z-index', settings.zindex);
}
// make sure the edge settings exist
if ((!options.hasOwnProperty('verticalEdge')) || ((options.verticalEdge.toLowerCase() != 'right') && (options.verticalEdge.toLowerCase() != 'left'))) {
options.verticalEdge = settings.verticalEdge;
}
if ((!options.hasOwnProperty('horizontalEdge')) || ((options.horizontalEdge.toLowerCase() != 'top') && (options.horizontalEdge.toLowerCase() != 'bottom'))) {
options.horizontalEdge = settings.horizontalEdge;
}
options.verticalEdge = options.verticalEdge.toLowerCase();
options.horizontalEdge = options.horizontalEdge.toLowerCase();
//display the notification in the right corner
$('.jquery-notific8-container.' + options.verticalEdge + '.' + options.horizontalEdge).notific8(message, options);
break;
}
};
// plugin setup
$.fn.notific8 = function(message, options) {
if (typeof message == "string") {
return methods.init.apply(this, arguments);
} else {
$.error('jQuery.notific8 takes a string message as the first parameter');
}
};
})(jQuery) |