Or just add one line like this:
Code:
<script type="text/javascript">
$(document).ready(function() {
$('#links a').click(function() {
var url=$(this).attr('href');
$('#headlines').load(url + ' #newsItems');
return false;
});
$('#links a').click();
});
</script>
Essentially triggers the click event on the link in question. It can be changed otherwise too... like so:
Code:
<script type="text/javascript">
$(document).ready(function() {
var url=$('#links a').attr('href');
$('#headlines').load(url + ' #newsItems');
});
</script>
But what you use is really up to you. The second one will have no effect if people actually do decide to click on the link, and it will follow the link, so the first solution might be the better choice, depending on what you really want to do.