Skip to content

Instantly share code, notes, and snippets.

@fabioyamate
Created August 20, 2014 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabioyamate/ef8b89998fc7e1a7c01c to your computer and use it in GitHub Desktop.
Save fabioyamate/ef8b89998fc7e1a7c01c to your computer and use it in GitHub Desktop.
Pageshow
<!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