画面中央のコンテナの左(又は右)を画面端まで領域拡大するJS

function overflowSpaceCalc(){
    var wWidth = $(window).width();
    var ofspace = 0;
    if(wWidth > 1000){
        ofspace = (wWidth - 1000)/2;
    }else{
        ofspace = 0;
    }
    return Math.round(ofspace);
}      

$(window).on('load resize', function(){
    var wWidth = $(window).width();
    if(wWidth > 999){
        ofspace = overflowSpaceCalc() + "px";
        ofspaceN = "-" + ofspace;
        $('.ofspace-left').css('margin-left',ofspaceN);
        $('.ofspace-left').css('padding-left',ofspace);
    }
});