Created
August 20, 2014 14:25
-
-
Save fabioyamate/ef8b89998fc7e1a7c01c to your computer and use it in GitHub Desktop.
Pageshow
This file contains 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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery Snippet</title> | |
</head> | |
<body> | |
<a href="event">event</a> | |
<ul id="container"> | |
</ul> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script> | |
$(window).on('load', function() { | |
$('#container').append('<li>load</li>'); | |
}); | |
$(window).on('pagehide', function() { | |
$('#container').append('<li>pagehide</li>'); | |
}); | |
$(window).on('pageshow', function() { | |
$('#container').append('<li>pageshow</li>'); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment