3 ms·
Commonly Confused Bits Of jQuery
- whatever1234 16y agoThis article is pretty ok, but some examples given struck me as a little weird. Example for "live()": var newDiv = document.createElement('div'); newDiv.appendChild(document.createTextNode('hello, world!')); [...] document.body.appendChild(newDiv); jQuery simplifies DOM elements creation and insertion: var newDiv = $('<div>hello, world!</div>').appendTo('body'); It is kind of funny to see plain old DOM createElement/createTextNode in article about intricacies of jQuery. All of DOM elements creation in article uses non-jQuery mechanisms. Only one commenter mentioned that jQuery support easy elements creation/insertion. That way, article promotes somewhat half-baked usage of jQuery.
- dstein 16y agoI'm kind of surprised something better than JQuery hasn't caught on. JQuery syntax makes me cringe.
- Griever 16y agoReally? I've actually kinda grown to love it. What about it makes you dislike it so much?
- kenver 16y agoI'm really surprised you don't like it. It might sound strange but the first thing that got me hooked on jQuery was the syntax, and then the selector mechanism. It feels very clean, looks readable and is quite concise, especially compared to the plain old javascript that I used to write. What is it you don't like? I'm not saying you're wrong for not liking it btw, each to their own! I'm just curious.