bc... [mtk]

jquery.noty.js ( File view )

  • By dxtk0812 2013-10-09
  • View(s):44
  • Download(s):0
  • Point(s): 1
			/**
* noty - jQuery Notification Plugin v1.2.1
* Contributors: https://github.com/needim/noty/graphs/contributors
*
* Examples and Documentation - http://needim.github.com/noty/
*
* Licensed under the MIT licenses:
* http://www.opensource.org/licenses/mit-license.php
*
**/
(function($) {

	$.noty = function(options, customContainer) {


		var base = {

};
		var $noty = null;
		var isCustom = false;

		base.init = function(options) {

			base.options = $.extend({

}, $.noty.defaultOptions, options);
			base.options.type = base.options.cssPrefix+base.options.type;
			base.options.id = base.options.type+'_'+new Date().getTime();
			base.options.layout = base.options.cssPrefix+'layout_'+base.options.layout;

			if (base.options.custom.container) customContainer = base.options.custom.container;
			isCustom = ($.type(customContainer) === 'object') ? true : false;

			return base.addQueue();
		
};

		// Push notification to queue
		base.addQueue = function() {

			var isGrowl = ($.inArray(base.options.layout, $.noty.growls) == -1) ? false : true;
	  	if (!isGrowl) (base.options.force) ? $.noty.queue.unshift({
options: base.options
}) : $.noty.queue.push({
options: base.options
});
	  	return base.render(isGrowl);
		
};

		// Render the noty
		base.render = function(isGrowl) {


			// Layout spesific container settings
			var container = (isCustom) ? customContainer.addClass(base.options.theme+' '+base.options.layout+' noty_custom_container') : $('body');
	  	if (isGrowl) {

	  		if ($('ul.noty_cont.' + base.options.layout).length == 0)
	  			container.prepend($('<ul/>').addClass('noty_cont ' + base.options.layout));
	  		container = $('ul.noty_cont.' + base.options.layout);
	  	
} else {

	  		if ($.noty.available) {

					var fromQueue = $.noty.queue.shift(); // Get noty from queue
					if ($.type(fromQueue) === 'object') {

						$.noty.available = false;
						base.options = fromQueue.options;
					
} else {

						$.noty.available = true; // Queue is over
						return base.options.id;
					
}
	  		
} else {

	  			return base.options.id;
	  		
}
	  	
}
	  	base.container = container;

	  	// Generating noty bar
	  	base.bar = $('<div class="noty_bar"/>').attr('id', base.options.id).addClass(base.options.theme+' '+base.options.layout+' '+base.options.type);
	  	$noty = base.bar;
	  	$noty.append(base.options.template).find('.noty_text').html(base.options.text);
	  	$noty.data('noty_options', base.options);

	  	// Close button display
	  	(base.options.closeButton) ? $noty.addClass('noty_closable').find('.noty_close').show() : $noty.find('.noty_close').remove();

	  	// Bind close event to button
	  	$noty.find('.noty_close').bind('click', function() {
 $noty.trigger('noty.close'); 
});

	  	// If we have a button we must disable closeOnSelfClick and closeOnSelfOver option
	  	if (base.options.buttons) base.options.closeOnSelfClick = base.options.closeOnSelfOver = false;
	  	// Close on self click
	  	if (base.options.closeOnSelfClick) $noty.bind('click', function() {
 $noty.trigger('noty.close'); 
}).css('cursor', 'pointer');
	  	// Close on self mouseover
	  	if (base.options.closeOnSelfOver) $noty.bind('mouseover', function() {
 $noty.trigger('noty.close'); 
}).css('cursor', 'pointer');

	  	// Set buttons if available
	  	if (base.options.buttons) {

				$buttons = $('<div/>').addClass('noty_buttons');
				$noty.find('.noty_message').append($buttons);
				$.each(base.options.buttons, function(i, button) {

					bclass = (button.type) ? button.type : 'gray';
					$button = $('<button/>').addClass(bclass).html(button.text).appendTo($noty.find('.noty_buttons'))
					.bind('click', function() {

						if ($.isFunction(button.click)) {

							button.click.call($button, $noty);
						
}
					
});
				
});
			
}

	  	return base.show(isGrowl);
		
};

		base.show = function(isGrowl) {


			// is Modal?
			if (base.options.modal) $('<div/>').addClass('noty_modal').addClass(base.options.theme).prependTo($('body')).fadeIn('fast');

			$noty.close = function() {
 return this.trigger('noty.close'); 
};

			// Prepend noty to container
			(isGrowl) ? base.container.prepend($('<li/>').append($noty)) : base.container.prepend($noty);

	  	// topCenter and center specific options
	  	if (base.options.layout == 'noty_layout_topCenter' || base.options.layout == 'noty_layout_center') {

				$.noty.reCenter($noty);
			
}

	  	$noty.bind('noty.setText', function(event, text) {

	  		$noty.find('.noty_text').html(text); 
	  		
	  		if (base.options.layout == 'noty_layout_topCenter' || base.options.layout == 'noty_layout_center') {

	  			$.noty.reCenter($noty);
	  		
}
	  	
});

	  	$noty.bind('noty.setType', function(event, type) {

	  		$noty.removeClass($noty.data('noty_options').type); 

			type = $noty.data('noty_options').cssPrefix+type;

			$noty.data('noty_options').type = type;

			$noty.addClass(type);
	  		
	  		if (base.options.layout == 'noty_layout_topCenter' || base.options.layout == 'noty_layout_center') {

	  			$.noty.reCenter($noty);
	  		
}
	  	
});

	  	$noty.bind('noty.getId', function(event) {

	  		return $noty.data('noty_options').id;
	  	
});

	  	// Bind close event
	  	$noty.one('noty.close', function(event) {

				var options = $noty.data('noty_options');
        if(options.onClose){
options.onClose();
}

				// Modal Cleaning
				if (options.modal) $('.noty_modal').fadeOut('fast', function() {
 $(this).remove(); 
});

				$noty.clearQueue().stop().animate(
						$noty.data('noty_options').animateClose,
						$noty.data('noty_options').speed,
						$noty.data('noty_options').easing,
						$noty.data('noty_options').onClosed)
				.promise().
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 1

Download
0 lines left, continue to read

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.97 kB
.htaccess232.00 B2013-08-14|09:52
README.md445.00 B2013-08-14|09:52
blank.html11.40 kB2013-08-14|09:52
calendar.html12.04 kB2013-08-14|09:52
chart.html15.03 kB2013-08-14|09:52
01.97 kB
bootstrap-cerulean.css105.84 kB2013-08-14|09:52
bootstrap-classic.css97.55 kB2013-08-14|09:52
bootstrap-classic.min.css81.03 kB2013-08-14|09:52
bootstrap-cyborg.css113.47 kB2013-08-14|09:52
bootstrap-journal.css101.30 kB2013-08-14|09:52
bootstrap-redy.css105.84 kB2013-08-14|09:52
bootstrap-responsive.css14.11 kB2013-08-14|09:52
bootstrap-responsive.min.css10.38 kB2013-08-14|09:52
bootstrap-simplex.css108.55 kB2013-08-14|09:52
bootstrap-slate.css118.87 kB2013-08-14|09:52
bootstrap-spacelab.css110.01 kB2013-08-14|09:52
bootstrap-united.css99.88 kB2013-08-14|09:52
charisma-app.css10.64 kB2013-08-14|09:52
chosen.css13.84 kB2013-08-14|09:52
colorbox.css3.22 kB2013-08-14|09:52
elfinder.min.css28.95 kB2013-08-14|09:52
elfinder.theme.css1.78 kB2013-08-14|09:52
fullcalendar.css10.45 kB2013-08-14|09:52
fullcalendar.print.css1.31 kB2013-08-14|09:52
jquery-ui-1.8.21.custom.css32.47 kB2013-08-14|09:52
jquery.cleditor.css1.36 kB2013-08-14|09:52
jquery.iphone.toggle.css3.81 kB2013-08-14|09:52
jquery.noty.css2.07 kB2013-08-14|09:52
noty_theme_default.css8.55 kB2013-08-14|09:52
opa-icons.css38.70 kB2013-08-14|09:52
uniform.default.css10.35 kB2013-08-14|09:52
uploadify.css2.48 kB2013-08-14|09:52
01.97 kB
01.97 kB
01.97 kB
html_structure.png43.52 kB2013-08-14|09:52
image_1.png5.18 kB2013-08-14|09:52
01.97 kB
documenter_style.css7.27 kB2013-08-14|09:52
01.97 kB
info.png686.00 B2013-08-14|09:52
pre_bg.png98.00 B2013-08-14|09:52
warning.png607.00 B2013-08-14|09:52
favicon.ico4.19 kB2013-08-14|09:52
index.html9.58 kB2013-08-14|09:52
01.97 kB
jquery.1.6.4.js89.52 kB2013-08-14|09:52
jquery.easing.js7.91 kB2013-08-14|09:52
jquery.scrollTo-1.4.2-min.js2.20 kB2013-08-14|09:52
script.js3.79 kB2013-08-14|09:52
error.html1.65 kB2013-08-14|09:52
file-manager.html11.75 kB2013-08-14|09:52
form.html23.81 kB2013-08-14|09:52
gallery.html17.60 kB2013-08-14|09:52
grid.html19.40 kB2013-08-14|09:52
icon.html323.15 kB2013-08-14|09:52
01.97 kB
01.97 kB
ajax-loader-1.gif723.00 B2013-08-14|09:52
ajax-loader-2.gif477.00 B2013-08-14|09:52
ajax-loader-3.gif1.05 kB2013-08-14|09:52
ajax-loader-4.gif404.00 B2013-08-14|09:52
ajax-loader-5.gif2.82 kB2013-08-14|09:52
ajax-loader-6.gif3.86 kB2013-08-14|09:52
ajax-loader-7.gif10.57 kB2013-08-14|09:52
ajax-loader-8.gif7.08 kB2013-08-14|09:52
arrows-active.png201.00 B2013-08-14|09:52
arrows-normal.png312.00 B2013-08-14|09:52
bg-input-focus.png143.00 B2013-08-14|09:52
bg-input.png143.00 B2013-08-14|09:52
border.png163.00 B2013-08-14|09:52
buttons.gif2.99 kB2013-08-14|09:52
cancel-off.png699.00 B2013-08-14|09:52
cancel-on.png715.00 B2013-08-14|09:52
chosen-sprite.png559.00 B2013-08-14|09:52
controls.png1.99 kB2013-08-14|09:52
crop.gif329.00 B2013-08-14|09:52
dialogs.png16.13 kB2013-08-14|09:52
error_bg.png137.00 B2013-08-14|09:52
favicon.ico4.19 kB2013-08-14|09:52
01.97 kB
01.97 kB
l1_MS5qcGc1344290228.png5.13 kB2013-08-14|09:52
l1_MTAuanBn1344290212.png5.20 kB2013-08-14|09:52
l1_MTEuanBn1344290212.png5.68 kB2013-08-14|09:52
l1_MTIuanBn1344290216.png5.68 kB2013-08-14|09:52
l1_MTMuanBn1344290218.png5.46 kB2013-08-14|09:52
l1_MTQuanBn1344290218.png5.60 kB2013-08-14|09:52
l1_MTUuanBn1344290220.png5.63 kB2013-08-14|09:52
l1_MTYuanBn1344290222.png5.39 kB2013-08-14|09:52
l1_MTcuanBn1344290224.png5.10 kB2013-08-14|09:52
l1_MTguanBn1344290226.png6.01 kB2013-08-14|09:52
l1_MTkuanBn1344290228.png5.91 kB2013-08-14|09:52
l1_Mi5qcGc1344290242.png5.63 kB2013-08-14|09:52
l1_MjAuanBn1344290232.png4.62 kB2013-08-14|09:52
l1_MjEuanBn1344290232.png4.59 kB2013-08-14|09:52
l1_MjIuanBn1344290236.png5.42 kB2013-08-14|09:52
l1_MjMuanBn1344290238.png5.80 kB2013-08-14|09:52
l1_MjQuanBn1344290240.png5.70 kB2013-08-14|09:52
l1_My5qcGc1344290244.png4.40 kB2013-08-14|09:52
l1_NC5qcGc1344290246.png5.61 kB2013-08-14|09:52
l1_NS5qcGc1344290246.png5.86 kB2013-08-14|09:52
l1_Ni5qcGc1344290248.png5.91 kB2013-08-14|09:52
l1_Ny5qcGc1344290252.png4.94 kB2013-08-14|09:52
l1_OC5qcGc1344290254.png5.68 kB2013-08-14|09:52
l1_OS5qcGc1344290254.png5.60 kB2013-08-14|09:52
1.jpg373.25 kB2013-08-14|09:52
10.jpg389.85 kB2013-08-14|09:52
11.jpg646.25 kB2013-08-14|09:52
12.jpg706.80 kB2013-08-14|09:52
13.jpg364.00 kB2013-08-14|09:52
14.jpg576.44 kB2013-08-14|09:52
15.jpg544.08 kB2013-08-14|09:52
16.jpg385.16 kB2013-08-14|09:52
17.jpg335.24 kB2013-08-14|09:52
18.jpg398.55 kB2013-08-14|09:52
19.jpg649.20 kB2013-08-14|09:52
2.jpg763.09 kB2013-08-14|09:52
20.jpg386.55 kB2013-08-14|09:52
21.jpg406.99 kB2013-08-14|09:52
22.jpg658.64 kB2013-08-14|09:52
23.jpg678.27 kB2013-08-14|09:52
24.jpg414.93 kB2013-08-14|09:52
3.jpg416.75 kB2013-08-14|09:52
4.jpg459.91 kB2013-08-14|09:52
5.jpg612.49 kB2013-08-14|09:52
6.jpg697.43 kB2013-08-14|09:52
7.jpg643.92 kB2013-08-14|09:52
8.jpg537.01 kB2013-08-14|09:52
9.jpg605.59 kB2013-08-14|09:52
01.97 kB
1.jpg20.25 kB2013-08-14|09:52
10.jpg19.88 kB2013-08-14|09:52
11.jpg22.11 kB2013-08-14|09:52
12.jpg15.37 kB2013-08-14|09:52
13.jpg20.36 kB2013-08-14|09:52
14.jpg21.85 kB2013-08-14|09:52
15.jpg21.72 kB2013-08-14|09:52
16.jpg20.72 kB2013-08-14|09:52
17.jpg20.24 kB2013-08-14|09:52
18.jpg21.68 kB2013-08-14|09:52
19.jpg22.03 kB2013-08-14|09:52
2.jpg16.25 kB2013-08-14|09:52
20.jpg19.71 kB2013-08-14|09:52
21.jpg19.48 kB2013-08-14|09:52
22.jpg21.04 kB2013-08-14|09:52
23.jpg21.72 kB2013-08-14|09:52
24.jpg20.97 kB2013-08-14|09:52
3.jpg19.43 kB2013-08-14|09:52
4.jpg21.63 kB2013-08-14|09:52
5.jpg22.30 kB2013-08-14|09:52
6.jpg22.23 kB2013-08-14|09:52
7.jpg19.36 kB2013-08-14|09:52
8.jpg21.65 kB2013-08-14|09:52
9.jpg21.87 kB2013-08-14|09:52
glyphicons-halflings-white.png8.57 kB2013-08-14|09:52
glyphicons-halflings.png13.50 kB2013-08-14|09:52
icons-big.png34.59 kB2013-08-14|09:52
icons-small.png7.19 kB2013-08-14|09:52
01.97 kB
off.png2.52 kB2013-08-14|09:52
on.png2.44 kB2013-08-14|09:52
slider.png1.20 kB2013-08-14|09:52
slider_center.png260.00 B2013-08-14|09:52
slider_left.png324.00 B2013-08-14|09:52
slider_right.png321.00 B2013-08-14|09:52
loading.gif9.21 kB2013-08-14|09:52
loading_background.png166.00 B2013-08-14|09:52
logo.png5.18 kB2013-08-14|09:52
logo20.png1.07 kB2013-08-14|09:52
opa-icons-black16.png27.24 kB2013-08-14|09:52
opa-icons-black32.png80.32 kB2013-08-14|09:52
opa-icons-blue16.png37.07 kB2013-08-14|09:52
opa-icons-blue32.png71.34 kB2013-08-14|09:52
opa-icons-color16.png44.21 kB2013-08-14|09:52
opa-icons-color32.png83.45 kB2013-08-14|09:52
opa-icons-darkgray16.png37.33 kB2013-08-14|09:52
opa-icons-darkgray32.png80.32 kB2013-08-14|09:52
opa-icons-gray16.png33.40 kB2013-08-14|09:52
opa-icons-gray32.png71.99 kB2013-08-14|09:52
opa-icons-green16.png39.08 kB2013-08-14|09:52
opa-icons-green32.png75.68 kB2013-08-14|09:52
opa-icons-orange16.png37.45 kB2013-08-14|09:52
opa-icons-orange32.png72.39 kB2013-08-14|09:52
opa-icons-red16.png37.41 kB2013-08-14|09:52
opa-icons-red32.png72.02 kB2013-08-14|09:52
opa-icons-white16.png20.87 kB2013-08-14|09:52
opa-icons-white32.png45.09 kB2013-08-14|09:52
progress.gif1.69 kB2013-08-14|09:52
qrcode.png1.51 kB2013-08-14|09:52
qrcode136.png10.03 kB2013-08-14|09:52
quicklook-bg.png78.00 B2013-08-14|09:52
quicklook-icons.png2.58 kB2013-08-14|09:52
resize.png101.00 B2013-08-14|09:52
spinner-mini.gif1.81 kB2013-08-14|09:52
sprite.png33.43 kB2013-08-14|09:52
star-half.png667.00 B2013-08-14|09:52
star-off.png685.00 B2013-08-14|09:52
star-on.png631.00 B2013-08-14|09:52
thumb.png7.21 kB2013-08-14|09:52
toolbar.gif68.00 B2013-08-14|09:52
toolbar.png16.76 kB2013-08-14|09:52
ui-bg_flat_0_aaaaaa_40x100.png180.00 B2013-08-14|09:52
ui-bg_flat_75_ffffff_40x100.png178.00 B2013-08-14|09:52
ui-bg_glass_55_fbf9ee_1x400.png120.00 B2013-08-14|09:52
ui-bg_glass_65_ffffff_1x400.png105.00 B2013-08-14|09:52
ui-bg_glass_75_dadada_1x400.png111.00 B2013-08-14|09:52
ui-bg_glass_75_e6e6e6_1x400.png110.00 B2013-08-14|09:52
ui-bg_glass_95_fef1ec_1x400.png119.00 B2013-08-14|09:52
ui-bg_highlight-soft_75_cccccc_1x100.png101.00 B2013-08-14|09:52
ui-icons_222222_256x240.png4.27 kB2013-08-14|09:52
ui-icons_2e83ff_256x240.png4.27 kB2013-08-14|09:52
ui-icons_454545_256x240.png4.27 kB2013-08-14|09:52
ui-icons_888888_256x240.png4.27 kB2013-08-14|09:52
ui-icons_cd0a0a_256x240.png4.27 kB2013-08-14|09:52
uploadify-cancel.png2.89 kB2013-08-14|09:52
index.html24.36 kB2013-08-14|09:52
01.97 kB
bootstrap-alert.js2.34 kB2013-08-14|09:52
bootstrap-button.js2.65 kB2013-08-14|09:52
bootstrap-carousel.js4.90 kB2013-08-14|09:52
bootstrap-collapse.js4.29 kB2013-08-14|09:52
bootstrap-dropdown.js2.66 kB2013-08-14|09:52
bootstrap-modal.js5.54 kB2013-08-14|09:52
bootstrap-popover.js2.81 kB2013-08-14|09:52
bootstrap-scrollspy.js4.27 kB2013-08-14|09:52
bootstrap-tab.js3.30 kB2013-08-14|09:52
bootstrap-toggle.js2.76 kB2013-08-14|09:52
bootstrap-tooltip.js7.49 kB2013-08-14|09:52
bootstrap-tour.js6.67 kB2013-08-14|09:52
bootstrap-transition.js1.76 kB2013-08-14|09:52
bootstrap-typeahead.js6.91 kB2013-08-14|09:52
charisma.js18.60 kB2013-08-14|09:52
excanvas.js40.80 kB2013-08-14|09:52
fullcalendar.min.js48.83 kB2013-08-14|09:52
jquery-1.7.2.min.js92.62 kB2013-08-14|09:52
jquery-ui-1.8.21.custom.min.js202.07 kB2013-08-14|09:52
jquery.autogrow-textarea.js2.09 kB2013-08-14|09:52
jquery.chosen.min.js22.40 kB2013-08-14|09:52
jquery.cleditor.min.js11.76 kB2013-08-14|09:52
jquery.colorbox.min.js9.46 kB2013-08-14|09:52
jquery.cookie.js1.90 kB2013-08-14|09:52
jquery.dataTables.min.js69.08 kB2013-08-14|09:52
jquery.elfinder.min.js130.93 kB2013-08-14|09:52
jquery.flot.min.js36.67 kB2013-08-14|09:52
jquery.flot.pie.min.js8.65 kB2013-08-14|09:52
jquery.flot.resize.min.js1.21 kB2013-08-14|09:52
jquery.flot.stack.js6.80 kB2013-08-14|09:52
jquery.history.js21.07 kB2013-08-14|09:52
jquery.iphone.toggle.js9.69 kB2013-08-14|09:52
jquery.js242.01 kB2013-08-14|09:52
jquery.noty.js8.19 kB2013-08-14|09:52
jquery.raty.min.js7.37 kB2013-08-14|09:52
jquery.uniform.min.js9.10 kB2013-08-14|09:52
jquery.uploadify-3.1.min.js45.20 kB2013-08-14|09:52
license.txt585.00 B2013-08-14|09:52
login.html6.30 kB2013-08-14|09:52
01.97 kB
check-exists.php412.00 B2013-08-14|09:52
01.97 kB
MySQLStorage.sql1.10 kB2013-08-14|09:52
connector.php2.06 kB2013-08-14|09:52
elFinder.class.php30.51 kB2013-08-14|09:52
elFinderConnector.class.php3.05 kB2013-08-14|09:52
elFinderVolumeDriver.class.php86.87 kB2013-08-14|09:52
elFinderVolumeLocalFileSystem.class.php21.82 kB2013-08-14|09:52
elFinderVolumeMySQL.class.php22.56 kB2013-08-14|09:52
mime.types13.55 kB2013-08-14|09:52
uploadify.php771.00 B2013-08-14|09:52
uploadify.swf12.38 kB2013-08-14|09:52
01.97 kB
blank.php834.00 B2013-08-14|09:52
calendar.php1.46 kB2013-08-14|09:52
chart.php4.45 kB2013-08-14|09:52
error.php1.65 kB2013-08-14|09:52
file-manager.php1.16 kB2013-08-14|09:52
footer.php4.53 kB2013-08-14|09:52
form.php13.22 kB2013-08-14|09:52
gallery.php1.42 kB2013-08-14|09:52
grid.php8.81 kB2013-08-14|09:52
header.php7.05 kB2013-08-14|09:52
icon.php312.57 kB2013-08-14|09:52
index.php13.91 kB2013-08-14|09:52
login.php1.42 kB2013-08-14|09:52
table.php36.99 kB2013-08-14|09:52
tour.php1.04 kB2013-08-14|09:52
typography.php8.34 kB2013-08-14|09:52
ui.php11.67 kB2013-08-14|09:52
table.html47.57 kB2013-08-14|09:52
tour.html11.62 kB2013-08-14|09:52
typography.html18.92 kB2013-08-14|09:52
ui.html22.97 kB2013-08-14|09:52
...

jquery.noty.js (14.65 MB)

Need 1 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D