jquery problem, jquery takes over all links on page

Posted by vick on Stack Overflow See other posts from Stack Overflow or by vick
Published on 2010-04-16T03:47:28Z Indexed on 2010/04/16 3:53 UTC
Read the original article Hit count: 216

Filed under:
<script type="text/javascript">
$(document).ready(function() {
    $("a").click(function() {
        $("#results").load( "jquery-routing.php", { pageNo: $(this).text(), sortBy: $("#sortBy").val()} );
        return false;
    });
});    
</script> 

  <div id="results"> </div>    
<a href="jquery-routing.php?p=1">1</a>
<a href="jquery-routing.php?p=2">2</a>

that code works fine, only problem that after I run it all my a href links stop to work! The links become jquery ajax calls.. why?

© Stack Overflow or respective owner

Related posts about jQuery