4 ms·
Using jQuery allows for chaining, CSS selectors and a simple function call. Simply getting the width/height of an element in JavaScript is very hairy, especial
by pippy 15y ago
Using jQuery allows for chaining, CSS selectors and a simple function call.
Simply getting the width/height of an element in JavaScript is very hairy, especially when you want a cross browser solution.
I agree this jQuery thing a little redundant, but the simple fact it's the defacto, it fixes cross compatibility issues and it's easy to write stuff in.