Posted By

adamcoulombe on 10/06/09


Tagged

ajax search html jquery links hijax


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

xmartyxcorex
Vladislav
fortes
Balamir


Hijax Using jQuery - Search Friendly Ajax Links


 / Published in: jQuery
 

  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  

Comments

RSS Icon Subscribe to comments
Posted By: adamcoulombe on October 6, 2009

jQuery Hijax

    <ul>
            <li><a href="test.html">test</a></li>
            <li><a href="test1.html">test1</a></li>
            <li><a href="test2.html">test2</a></li>
    </ul>


            This is the index.html page!

    you started on index.html

You need to login to post a comment.