Skip to content

Commit 6eb6ab4

Browse files
committed
Typo fix
1 parent 4b35843 commit 6eb6ab4

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Bootstrap Alerts v1.2.0
1+
Bootstrap Alerts v1.2.2
22
===========
33

44
A jQuery plugin for displaying Bootstrap alerts. [Demo](http://jprieton.github.io/bootstrap-alerts)
@@ -20,3 +20,8 @@ License
2020
---
2121

2222
Licensed under the [MIT License](http://opensource.org/licenses/mit-license.html)
23+
24+
Bug tracker
25+
---
26+
27+
Have a bug? Please create an issue on GitHub at https://github.com/jprieton/bootstrap-alerts/issues

bootstrap-alerts.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Bootstrap Alerts v1.2.0, jQuery plugin
2+
* Bootstrap Alerts v1.2.2, jQuery plugin
33
*
44
* Copyright(c) 2015, Javier Prieto
55
* http://jprieton.github.io/bootstrap-alerts/
@@ -20,12 +20,12 @@
2020
clear: true
2121
}, options);
2222

23-
if (settings.type.lenght === 0) {
23+
if (settings.type.length === 0) {
2424
console.log('bootstrapAlert: type is empty');
2525
return false;
2626
}
27-
28-
if (settings.message.lenght === 0) {
27+
28+
if (settings.message.length === 0) {
2929
console.log('bootstrapAlert: message is empty');
3030
return false;
3131
}

bootstrap-alerts.min.js

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
/*
2-
* Bootstrap Alerts v1.2.0, jQuery plugin
2+
* Bootstrap Alerts v1.2.2, jQuery plugin
33
*
44
* Copyright(c) 2015, Javier Prieto
55
* http://jprieton.github.io/bootstrap-alerts/
66
*
77
* A jQuery plugin for displaying Bootstrap alerts.
88
* Licensed under the MIT License
99
*/
10-
(function($){"use strict";$.fn.bootstrapAlert=function(options){var settings=$.extend({type:"info",dismissible:true,heading:"",message:"",clear:true},options);if(settings.type.lenght===0){console.log("bootstrapAlert: type is empty");return false}if(settings.message.lenght===0){console.log("bootstrapAlert: message is empty");return false}var div=$('<div class="alert alert-'+settings.type+'" role="alert">');if(settings.dismissible){$(div).addClass("alert-dismissible");var button=$('<button type="button" class="close" data-dismiss="alert" aria-label="Close">');var span=$('<span aria-hidden="true">').html("&times;");$(span).appendTo(button);$(button).appendTo(div)}if(settings.heading.length>0){var heading=$('<h4 class="alert-heading">').html(settings.heading);$(heading).appendTo(div)}$(div).append(settings.message);if(settings.clear){$(this).empty()}$(div).appendTo(this);return this}})(jQuery);
10+
!function(e){"use strict"
11+
e.fn.bootstrapAlert=function(t){var s=e.extend({type:"info",dismissible:!0,heading:"",message:"",clear:!0},t)
12+
if(0===s.type.length)return console.log("bootstrapAlert: type is empty"),!1
13+
if(0===s.message.length)return console.log("bootstrapAlert: message is empty"),!1
14+
var a=e('<div class="alert alert-'+s.type+'" role="alert">')
15+
if(s.dismissible){e(a).addClass("alert-dismissible")
16+
var i=e('<button type="button" class="close" data-dismiss="alert" aria-label="Close">'),l=e('<span aria-hidden="true">').html("&times;")
17+
e(l).appendTo(i),e(i).appendTo(a)}if(s.heading.length>0){var r=e('<h4 class="alert-heading">').html(s.heading)
18+
e(r).appendTo(a)}return e(a).append(s.message),s.clear&&e(this).empty(),e(a).appendTo(this),this}}(jQuery)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bootstrap-alerts",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "A jQuery plugin for displaying Bootstrap alerts.",
55
"main": "bootstrap-alerts.js",
66
"keywords": [

0 commit comments

Comments
 (0)