Created
April 11, 2010 18:23
-
-
Save ryan5500/362954 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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