Return to Snippet

Revision: 40847
at February 8, 2011 22:12 by Savio


Initial Code
<script type="text/javascript">
	$(function()
	{
	$('#link a').click(function(e) {
	var url = $(this).attr('href');
	$('#elementToLoadContentInto').load(url);
	e.preventDefault();
	});
	});
	</script>

HTML:

basic list like 
<ul>
 <li><a href="#" id="link">blabla</a></li>
</ul>
<div id="elementToLoadContentInto">
blablabla
</div>

Initial URL

                                

Initial Description

                                

Initial Title
Basic AJAX load with jQuery

Initial Tags
ajax, jquery, load

Initial Language
jQuery