Fix eslint errors

This commit is contained in:
AdeAttwood 2017-11-17 05:30:37 +00:00
parent efe5348943
commit a47f00e7a1

View file

@ -1,12 +1,14 @@
(function ($) {
/* global jQuery */
(($) => {
$.fn.aalert = function (method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
} else {
$.error('Method ' + method + ' does not exist');
return false;
}
$.error('Method ' + method + ' does not exist');
return false;
};
var methods = {
@ -58,7 +60,7 @@
$this.hide();
}
if ( $this.hasClass('remove')) {
if ($this.hasClass('remove')) {
$this.remove();
}
@ -69,7 +71,7 @@
var $this = $(this);
if ($this.hasClass('fade')) {
$this.fadeIn();
} else if ( $this.hasClass('slide')) {
} else if ($this.hasClass('slide')) {
$this.slideDown();
} else {
$this.show();
@ -90,7 +92,7 @@
};
$('.alert [data-dismiss="aalert"]').click(e => {
$element = $(e.target).closest('.alert');
var $element = $(e.target).closest('.alert');
methods.close.apply($element);
});