Hi Sean,
Thanks, that seems to have done the trick - although it broke the Tabs
plugin I was using in my admin interface. I've created a workaround
and this works perfectly:
function hijackLinks(root) {
$('a',root).click(function(){
var type = $(this).attr('class');
if (type == "admin-link") {
// If admin link, load into sub-admin area
$('.admin-area').load(this.href,function(){
hijackLinks($('.content')); });
return false;
} else if (type == "no-ajax") {
// If no ajax link, ignore
} else {
// Normal content area link
$('.content').load(this.href,function(){
hijackLinks($('.content')); });
return false;
}
});
}
$(document).ready(function() {
hijackLinks(document);
});
Tane
On 4/17/07, Sean Catchpole <[EMAIL PROTECTED]> wrote:
Hi Tane,
> function hijackLinks(root) {
> $('a',root).bind('click', function(){
> $('.content').load(this.href);
> return false;
> });
> };
I would change this function to this instead of doing all that ajaxStart/Stop:
function hijackLinks(root) {
$('a',root).click(function(){
$('.content').load(this.href,function(){
hijackLinks($('.content')); });
return false; });
}
Then you only need to run your: $(function(){ hijackLinks(document); }
~Sean