How to not over-use jQuery?
- by Fedyashev Nikita
Typical jQuery over-use:
$('button').click(function() {
alert('Button clicked: ' + $(this).attr('id'));
});
Which can be simplified to:
$('button').click(function() {
alert('Button clicked: ' + this.id);
});
Which is way faster.
Can you give me any more examples of similar jQuery over-use?