Created
December 22, 2011 14:30
-
-
Save empirefx/1510484 to your computer and use it in GitHub Desktop.
index
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 PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Quis Nostrud</title> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<style type="text/css"> | |
p{ | |
background-color:#FFFBDB; | |
padding:5px; | |
} | |
</style> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('#links a').click(function() { | |
var url=$(this).attr('href'); | |
$('#headlines').load(url + ' #newsItems'); | |
return false; | |
}); | |
}); | |
</script> | |
</head> | |
<body id="threeCol"> | |
<div id="container"> | |
<div id="banner"> | |
<img src="../images/banner.png" alt="javascript: The Missing Manual" width="760" height="65"> | |
<span id="badge"> | |
<a href="http://www.sawmac.com/missing/js/"></a> | |
</span> | |
</div> | |
<div id="contentWrap"> | |
<div id="main"> | |
<h1>Using jQuery’s load() Function</h1> | |
<h2>Headlines</h2> | |
<ul id="links"> | |
<li><a href="archivo.html">Today’s News</a></li> | |
<li><a href="yesterday.html">Yesterday’s News</a></li> | |
<li><a href="lastweek.html">Last Week’s News</a></li> | |
</ul> | |
</div> | |
<div id="sidebar">1 | |
<h2>Script 11.1</h2> | |
</div> | |
</div> | |
<div id="news"> | |
<h2>News Headlines</h2> | |
<div id="headlines"></div> | |
</div> | |
<div id="footer"> | |
<em>“Building Interactive Web Sites with javascript”</em> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment