Skip to content

Instantly share code, notes, and snippets.

@mhorbul
Created December 7, 2010 02:03
Show Gist options
  • Save mhorbul/731355 to your computer and use it in GitHub Desktop.
Save mhorbul/731355 to your computer and use it in GitHub Desktop.
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
<div id="div1">block 1</div>
<script type="text/javascript">
$(document).ready(function() { alert($("#div2").text()) })
</script>
<div id="div2">block 2</div>
<script type="text/javascript">
$(document).ready(function() { alert($("#div3").text()) })
</script>
<div id="div3">block 3</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment