curious about one thing, where do you get the url from in:
url = $(this).attr('href');

as the span doesn't have a href attrib.

On 4/1/07, bingo <[EMAIL PROTECTED]> wrote:

Hi,

I am having some trouble with ajax and jquery...

I have my default webpage template and in that I have defined my
javascript as shown below

<!-- My webpage template -->
$(document).ready(function(){
       $('.loadContent').click(function(){
                url = $(this).attr('href');
                $("div#content").load(url);
                return false;
          });
});

<span class="loadContent">resume</span>

when I click on resume..it properly loads in the "content" div...my
resume is as follow
<div>
<span class="loadContent">Publications</span>
</div>

However when I click on publication, my publications are never
loaded...using firebug..I found that $('.loadContent') is never
called...
Looking some previous post, I found that I need to use callback
function.....But I dont have any idea on how use callback..
please let me know if you have any suggestions..

Regards,
Ritesh


Reply via email to