Change screen and update css

// if screen changed in ID(section), then update something..

var screensize= $( window ).width();
    if(screensize<=992){

            if($('#post-814').length>0)
            {
                $('.fw-col-md-3').addClass('col-xs-6');
            }
        }
changething = function(screensize){
        if(screensize<=992){

            if($('#post-814').length>0)
            {
                $('.fw-col-md-3').addClass('col-xs-6');

            }
        }
        else {
            if($('#post-814').length>0)
            {
                $('.fw-col-md-3').removeClass('col-xs-6');
            }
        }
}
$( window ).resize(function() {
 var screensize= $( window ).width();
  changething(screensize);
});