Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions demos/js/jquery.toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ if ( typeof Object.create !== 'function' ) {

var _toastContent = '';

this._toastEl = this._toastEl || $('<div></div>', {
class : 'jq-toast-single'
});
this._toastEl = this._toastEl || $('<div class="jq-toast-single"></div>');

// For the loader on top
_toastContent += '<span class="jq-toast-loader"></span>';
Expand Down Expand Up @@ -95,8 +93,8 @@ if ( typeof Object.create !== 'function' ) {
};
};

if ( this.options.class !== false ){
this._toastEl.addClass(this.options.class)
if ( this.options.htmlClass !== false ){
this._toastEl.addClass(this.options.htmlClass)
}
},

Expand Down Expand Up @@ -195,11 +193,7 @@ if ( typeof Object.create !== 'function' ) {

if ( _container.length === 0 ) {

_container = $('<div></div>',{
class: "jq-toast-wrap",
role: "alert",
"aria-live": "polite"
});
_container = $('<div class="jq-toast-wrap" role="alert" aria-live="polite"></div>');

$('body').append( _container );

Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.toast.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions src/jquery.toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ if ( typeof Object.create !== 'function' ) {

var _toastContent = '';

this._toastEl = this._toastEl || $('<div></div>', {
class : 'jq-toast-single'
});
this._toastEl = this._toastEl || $('<div class="jq-toast-single"></div>');

// For the loader on top
_toastContent += '<span class="jq-toast-loader"></span>';
Expand Down Expand Up @@ -95,8 +93,8 @@ if ( typeof Object.create !== 'function' ) {
};
};

if ( this.options.class !== false ){
this._toastEl.addClass(this.options.class)
if ( this.options.htmlClass !== false ){
this._toastEl.addClass(this.options.htmlClass)
}
},

Expand Down Expand Up @@ -201,11 +199,7 @@ if ( typeof Object.create !== 'function' ) {

if ( _container.length === 0 ) {

_container = $('<div></div>',{
class: "jq-toast-wrap",
role: "alert",
"aria-live": "polite"
});
_container = $('<div class="jq-toast-wrap" role="alert" aria-live="polite"></div>');

$('body').append( _container );

Expand Down