Skip to content

Instantly share code, notes, and snippets.

@ryan5500
Created April 11, 2010 18:23
Show Gist options
  • Save ryan5500/362954 to your computer and use it in GitHub Desktop.
Save ryan5500/362954 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript'>
//which is called early, ajaxStop or load?
$(function() {
$('#log').ajaxStop(function() {
$(this).text('trigger ajaxStop');
alert($('#result').text()); //this method is later
});
$('#trigger').click(function() {
$('#result').load('test.html'); //this method is earlier
});
});
</script>
</head>
<body>
<div id="log">log</div>
<div id="result">result</div>
<div id="trigger">trigger</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment