difficulty with deleting a function from jquery snippet

Posted by user1691389 on Stack Overflow See other posts from Stack Overflow or by user1691389
Published on 2012-11-17T04:46:40Z Indexed on 2012/11/17 5:00 UTC
Read the original article Hit count: 100

Filed under:
|

I'm trying to get rid of a function that appends a loading gif while the script is busy ajax'ing in new content, but I keep breaking the script so I'm posting it here hoping someone can just kindly edit it for me correctly. (I'd like to get rid of everything that has to do with #load and keep everything else intact.)

    $('#header_nav_content_container a, a.scroll_to_top, a.clear_banner, a.desire').not('.exception').click(function(){ 

    var toLoad = $(this).attr('href')+' #content';
    $('#content').hide(1555,'easeInOutQuint',loadContent);  
    $('#load').remove();
    $('body').append('<span id="load">LOADING...</span>');
    $('#load').fadeIn(888);
    window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-0);
    function loadContent() {
        $('#content').load(toLoad,'',showNewContent);  
    }
    function showNewContent() {
        $('#content').show(777,'',hideLoader);
    }
    function hideLoader() {
        $('#load').fadeOut(888);
    }
    return false;

}); 

Thanks for your help.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css