Skip to content

Instantly share code, notes, and snippets.

@nigelheap
Created September 11, 2011 12:43
Show Gist options
  • Save nigelheap/1209526 to your computer and use it in GitHub Desktop.
Save nigelheap/1209526 to your computer and use it in GitHub Desktop.
function foo( bar ) {
jQuery.data(document.body, 'response', 4);
if ( bar )
{
$.get('/something.php', function(response) {
jQuery.data(document.body, 'response', response);
});
}
return jQuery.data(document.body, 'response');
}
document.write(foo(1));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment