How can i write this code in a more efficient way. The only thing changing is the id and css property.
if($('#borderT').is(':checked')){$x.css('borderTopWidth',x)}else{$x.css('borderTopWidth','0')}
if($('#borderR').is(':checked')){$x.css('borderRightWidth',x)}else{$x.css('borderRightWidth','0')}
if($('#borderB').is(':checked')){$x.css('borderBottomWidth',x)}else{$x.css('borderBottomWidth','0')}
if($('#borderL').is(':checked')){$x.css('borderLeftWidth',x)}else{$x.css('borderLeftWidth','0')}