<button type="button" class="btn btn-sm btn-info btn-growl" data-growl="info"><i class="fa fa-info fa-fw"></i> Info</button>
<button type="button" class="btn btn-sm btn-warning btn-growl" data-growl="warning"><i class="fa fa-exclamation-triangle fa-fw"></i> Warning</button>
<button type="button" class="btn btn-sm btn-danger btn-growl" data-growl="danger"><i class="fa fa-times fa-fw"></i> Danger</button>
<script>
/* Grawl
Notifications with Bootstrap-growl plugin, check out more examples at
http://ifightcrime.github.io/bootstrap-growl/ */
$('.btn-growl').on('click', function () {
var growlType = $(this).data('growl');
$.bootstrapGrowl('<h4>Hi there!</h4> <p>This is another
notification!</p>', {
type: growlType,
delay: 2500,
allow_dismiss: true
});
$(this).prop('disabled', true);
});
</script>
ไม่มีความคิดเห็น:
แสดงความคิดเห็น