Показать сообщение отдельно
  #6 (permalink)  
Старый 30.07.2014, 11:51
Профессор
Отправить личное сообщение для Rise Посмотреть профиль Найти все сообщения от Rise
 
Регистрация: 07.11.2013
Сообщений: 4,662

condpattern,
(function() {
	var bttn = document.getElementsByClassName('progress-button');
	for (var i = 0; i < bttn.length; i++) {
		(function(k) {
			// make sure..
			bttn[k].disabled = false;
			bttn[k].addEventListener('click', function() {
				// simulate loading (for demo purposes only)
				classie.add(bttn[k], 'active');
				setTimeout(function() {
					classie.remove(bttn[k], 'active');
					// create the notification
					var notification = new NotificationFx({
						message: '<span class="icon icon-megaphone"></span><p>You have some interesting news in your inbox. Go <a href="#">check it out</a> now.</p>',
						layout: 'bar',
						effect: 'slidetop',
						type: 'notice', // notice, warning or error
						onClose: function() {
							bttn[k].disabled = false;
						}
					});
					// show the notification
					notification.show();
				}, 1200);
				// disable the button (for demo purposes only)
				this.disabled = true;
			});
		})(i);
	}
})();
Ответить с цитированием