$( '#save' ).click( function () {
var msgObj = $.notify.add( " " , 3);
// ( 3 ) msgObj
$.get( 'test.txt' , function (result) {
if (result.ok) { //
$.notify.remove(msgObj, 0.5);
// 0,5 ,
$.notify.add( " " , 1);
//
} else { //
$.notify.remove(msgObj, 0.5);
// 0,5 ,
$.notify.add( " " , 'error' , 3);
// "" (css error) 3
}
}, "json" );
});
* This source code was highlighted with Source Code Highlighter .
Source: https://habr.com/ru/post/103293/
All Articles