# Toast

To use the toast popup functionality the fusionCSS.js library needs to be included.

Toast With Timeout
Toast With Click to Hide
Toast With Click & Timeout

    <div class="button primary" id="testToast">Toast With Timeout</div>
    <div class="button accent" id="testToast2">Toast With Click to Hide</div>
    <div class="button accent" id="testToast3">Toast With Click & Timeout</div>

    $('#testToast').bind('click', function (e) {
    	$.toastShow('', 'This massage will be dismissed automatically
    ' + (new Date()));
    	e.preventDefault();
    });

    $('#testToast2').bind('click', function (e) {
    	$.toastShow('success', 'Click dismiss to remove this message
    ' + (new Date()), 'Dismiss', function () {
    		alert('Dismiss was clicked');
    	});
    	e.preventDefault();
    });

    $('#testToast3').bind('click', function (e) {
    	$.toastShow('success', 'Click dismiss or wait to remove this message
    ' + (new Date()), 'Dismiss', null, true);
    	e.preventDefault();
    });

Parameters

    $.toastShow(
    	The state to show 'success', 'error', 'warning', 'primary', 'accent' or '' for the default,
    	The message to show,
    	Optional action label,
    	Optional function to call when the action is clicked,
    	Optional bool to force with/without dismiss on timeout
    );

Success
Error
Warning
Primary
Accent
Default
Top