docs/js/materialize.js
/**
     * Create toast and append it to toast container
     */
Create toast and append it to toast container
Create toast and append it to toast container
function _createToast(){var toast=document.createElement('div');toast.classList.add('toast');
if(!!this.options.classes.length){$(toast).addClass(this.options.classes);}
if(typeof HTMLElement==='object'?this.message instanceof HTMLElement:this.message&&typeof this.message==='object'&&this.message!==null&&this.message.nodeType===1&&typeof this.message.nodeName==='string'){toast.appendChild(this.message);
}else if(!!this.message.jquery){$(toast).append(this.message[0]);
}else{toast.innerHTML=this.message;}
Toast._container.appendChild(toast);return toast;}
function _createToast ( ) { var toast = document . createElement ( 'div' ) ; toast . classList . add ( 'toast' ) ; if ( ! ! this . options . classes . length ) { $ ( toast ) . addClass ( this . options . classes ) ; } if ( typeof HTMLElement === 'object' ? this . message instanceof HTMLElement : this . message && typeof this . message === 'object' && this . message !== null && this . message . nodeType === 1 && typeof this . message . nodeName === 'string' ) { toast . appendChild ( this . message ) ; } else if ( ! ! this . message . jquery ) { $ ( toast ) . append ( this . message [ 0 ] ) ; } else { toast . innerHTML = this . message ; } Toast . _container . appendChild ( toast ) ; return toast ; }
Create toast and append it to toast container
Create toast and append it to toast container
// Add custom classes onto toast // Set content // Check if it is jQuery object // Insert as html; // Append toasft /**
     * Animate in toast
     */