$('#spinner_div').bind('ajaxStart', function() {
    $(this).show();
    $("#mybtn").hide();
}).bind('ajaxStop', function() {
    $(this).hide();
    $("#mybtn").show();
});