jquery load based on href

Posted by ntan on Stack Overflow See other posts from Stack Overflow or by ntan
Published on 2010-03-22T13:17:16Z Indexed on 2010/03/22 13:21 UTC
Read the original article Hit count: 325

Filed under:
|

Hi,

I am having a link

<a id="test" href="text.php">test</a>

I have the following jquery code

    $("#test").live("click", function(){                       
             $("#myDiv").load($("#text").attr("href"));         
        });

trying to load the href of #test inside myDiv.

But of course when click, start .load the href AND the browser changes to text.php.

Is there any way to achieve this.

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about load