Skip to content

Instantly share code, notes, and snippets.

@stvedt
Created September 4, 2012 15:32
Show Gist options
  • Save stvedt/3622454 to your computer and use it in GitHub Desktop.
Save stvedt/3622454 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page Loading</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
</head>
<body>
<p>This is a paragraph</p>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page Loading</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
</head>
<body>
<p>This is a paragraph</p>
</body>
<script>
$('p').text('replacement text');
</script>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page Loading</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>
$('p').text('replacement text');
</script>
</head>
<body>
<p>This is a paragraph</p>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page Loading</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('p').text('replacement text');
});
</script>
</head>
<body>
<p>This is a paragraph</p>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page Loading</title>
<script>
$(document).ready(function(){
$('p').text('replacement text');
});
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
</head>
<body>
<p>This is a paragraph</p>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Page Loading</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>
$(window).load(function(){
var imgHeight = $('img').height();
$('<p></p>').text(imgHeight).insertAfter($('img'));
});
</script>
</head>
<body>
<p>This is a paragraph</p>
<img src="image.png" />
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment