3 ms·
$.when( // Get the css-tricks once $.get("http://css-tricks.com"), // get it twice $.get("http://css-tricks.com") ).then(function( csst
by taf2 13y ago
$.when(
// Get the css-tricks once
$.get("http://css-tricks.com"),
// get it twice
$.get("http://css-tricks.com")
).then(function( csstricks1, csstricks2 ) {
console.log( 'Fetched css tricks' );
console.log( csstricks1, csstricks2 );
});
csstricks1[0] is the content object and usually what you'll want - for example, if the response is json.