Hijax Using jQuery - Search Friendly Ajax Links

/ Published in: jQuery
Save to your folder(s)

Copy this code and paste it in your HTML
  1. $(document).ready(function() {
  2. $("a").click(function(event) {
  3. // Prevent default click action if javascript is enabled
  4. event.preventDefault();
  5. //load the content of the new page into the content of the current page
  6. $("#content").load( $(this).attr("href") + " #content");
  7. })
  8. });

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.