// A sample logging function to be added to a callbacks list var foo = function( value ) { console.log( "foo: " + value ); }; // Another function to also be added to the list var bar = function( value ) { console.log( "bar: " + value ); }; // Callbacks 첫글자 대문자로..주의해야함. var callbacks = $.Callbacks(); // Add the function "foo" to the list callbacks.add( foo ); // Fire the items on the list callbac..
프로그래밍/JavaScript
$.ajax({ method:"post", url:"some.html", data: {name:"John", location:"Seoul"}, cache:false }).done(function(msg) { alert("Data Save: " + msg); }).fail(function(msg) { alert("Data Save: " + msg); }).always(function(msg) { alert("Data Save: " + msg); });