Added the project's files to the repo
This commit is contained in:
18
assets/js/modules/alert-box.js
Executable file
18
assets/js/modules/alert-box.js
Executable file
@ -0,0 +1,18 @@
|
||||
(function() {
|
||||
(function($) {
|
||||
$.fn.alert = function() {
|
||||
return this.each(function() {
|
||||
var self;
|
||||
self = $(this);
|
||||
self.on('click', '.close-button', function(e) {
|
||||
e.preventDefault();
|
||||
self.addClass('close');
|
||||
});
|
||||
self.on('transitionEnd webkitTransitionEnd oTransitionEnd', function() {
|
||||
self.remove();
|
||||
});
|
||||
});
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
}).call(this);
|
22
assets/js/modules/awesome-form.js
Executable file
22
assets/js/modules/awesome-form.js
Executable file
@ -0,0 +1,22 @@
|
||||
(function() {
|
||||
$(function() {
|
||||
var awesomeInput, checkInput;
|
||||
awesomeInput = '.awesome-form .input-group input';
|
||||
checkInput = function(elem) {
|
||||
var text_val;
|
||||
text_val = $(elem).val();
|
||||
if (text_val === '') {
|
||||
$(elem).removeClass('has-value');
|
||||
} else {
|
||||
$(elem).addClass('has-value');
|
||||
}
|
||||
};
|
||||
$(awesomeInput).focusout(function() {
|
||||
checkInput(this);
|
||||
});
|
||||
$(awesomeInput).on('change', function() {
|
||||
checkInput(this);
|
||||
});
|
||||
});
|
||||
|
||||
}).call(this);
|
Reference in New Issue
Block a user