load content and custom scroller

load content and custom scroller

Hi All,

I'm having real trouble implementing a custom scroller to content that is loaded into the page after initial page load. My computer is becoming dangerously close to being thrown down the street! My custom scroller is called flexcroll. The code for my content loader is as follows:

$j(document).ready(function() {  
  
  
  
    $j('#nav li a').click(function(){  
  
    var toLoad = $j(this).attr('href')+'#content';  
    $j('#content').fadeOut('400',loadContent);  
    $j('#load').remove();  
    $j('#wrapper').append('<span id="load">LOADING...</span>');  
    $j('#load').fadeIn('normal');  
    function loadContent() {  
        $j('#content').load(toLoad,'',showNewContent()); 
    }  
    function showNewContent() {  
        $j('#content').fadeIn('400',hideLoader());  
    }   
    function hideLoader() {  
        $j('#load').fadeOut('normal');  
    }  

return false;  
    }); 
});  



I have also included the following in my header to remove $ conflicts:

<script type="text/javascript">var $j = jQuery.noConflict();</script>

I have tried to add fleXenv.initByClass("flexcroll");  just before the 'return false'. This doesnt work the first time but if I click a dead link some where on the page then it fixes the div. How is this the case. Basically I need to know how to refresh my other scripts once the new content is added (this problem is also happening to my lytebox script).

If anyone could help me I would be so grateful! Im right at the bottom of a jquery hole.

Thanks Mike