So, I'm working on a site that uses ajax to load content between pages, but the javascript inside these pages stops working when it loads, even if it works fine if I go to the page right away.
Here is the index page
http://tinyurl.com/82exd3u
if you press "services", you will see that it loads when the sidebar of the accordion is not working. And when I visit the page directly, it works great.
http://tinyurl.com/7jfjek8
heres ajax code im using (tried to use live, but it didn't do the job)
$(document).ready(function() {
$('.nav').live('click', function(){
var href = $(this).attr('href')+" #content";
$('#content').hide().load(href).fadeIn('normal');
return false
});
});
and I removed the finished part of document () from the accordion code, hoping that this would do the trick, but still nothing.
Any ideas? thanks in advance
source
share