Skip to content

Instantly share code, notes, and snippets.

@mklabs
Created October 13, 2010 13:02
Show Gist options
  • Save mklabs/623987 to your computer and use it in GitHub Desktop.
Save mklabs/623987 to your computer and use it in GitHub Desktop.
// 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').click(function() {
$(this).attr('title', 'new title');
$(this).width('100px');
});
$('.foo #bar').click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment