Hi,

Can anyone help with this please?  This is a major UI issue for me
now, and I cannot seem to get it to work.

I've tested on both FF2 and Opera 9, and both are the same - initial
links from the main document work, but links inside the loaded content
don't.

I'm using CakePHP for the backend and I don't want to have to hard
code anything into my views to make this work :/

Tane

On 4/17/07, digital spaghetti <[EMAIL PROTECTED]> wrote:
Hey folks,

I've been working on this one with a little help, but i'm now stuck.

I have an AJAX interface, where I want all internal links to load
content into a specific div called .content.  The issue is it works,
except for link in content thats loaded into the div.

So far, here is what I have:

function hijackLinks(root) {
$('a',root).bind('click', function(){
       $('.content').load(this.href);
       return false;
});
};

This is the function that I pass the clicked link in to, I take it's
href and load the page into the .content div.

$(document).ready(function() {
       hijackLinks(document);
});

This loads the function on first load.  Then I do this:

$().ajaxStart(function(){
        $.blockUI
        hijackLinks($('.content').get(0));
});

$().ajaxStop(function(){
        $.unblockUI;
        hijackLinks($('.content').get(0));
});

i've called the function on both ajaxStart() and ajaxStop() to reload
the function into the page, but doesn't seem to work.  Can anyone
maybe help?

THanks,
Tane

Reply via email to