Improve the code
JavaScript
// 6: how could you improve the following code?
$(document).ready(function() {
$('.foo #bar').css('color', 'red');
$('.foo #bar').css('border', '1px solid blue');
$('.foo #bar').text('new text!');
$('.foo #bar').on("click", function() {
$(this).attr('title', 'new title');
$(this).width('100px');
});
});