Skip to content

Instantly share code, notes, and snippets.

View alfredobarron's full-sized avatar
😎
Working everyday

Alfredo Barron alfredobarron

😎
Working everyday
View GitHub Profile
// Alert Default
$.smkAlert();
// Alert Warning
$.smkAlert({text:'Alert type "warning"', type:'warning'});
// Alert Success
$.smkAlert({text:'Alert type "success"', type:'success'});
// Alert Danger 10 seconds
$.smkAlert({text:'Alert type "danger" time 10 seconds', type:'danger', time: 10});
// Alert Info permanent
$.smkAlert({text:'Alert type "info" permanent', type:'info', permanent: true});
// Confirmation
$.smkConfirm({text:'Are you sure?', accept:'Accept', cancel:'Cancel'}, function(e){if(e){
// Code here
}});
var currency = $.smkCurrency(10000, '$');
var url = $.smkGetURL();
var date = $.smkDate();
var date = $.smkDate({
date: '30-12-2014',
format:'dd/MM/yyyy',
lang:'es'
});
var date = $.smkDateDiff({
fromDate: '09/25/2014',
toDate: '09/30/2014',
interval:'days'
});
if( $('#form').smkValidate() ){
// Code here
}
<form>
<div class="form-group">
<label>Text</label>
<input type="text" class="form-control" required>
</div>
<div class="form-group">
<label>Select</label>
<select class="form-control" required>
<option value="">Select</option>
<option value="1">1</option>