|
|
|
|
|
by monoideism
2328 days ago
|
|
> JQuerry might not be the tool for your job Again, jQuery. I'm a little skeptical that you use either very often if you don't even know how to spell it. `jQuery` is literally the global namespace for jQuery (often aliased to `$`). > and the one I use a lot .css() .after(), .append() etc after: // jQuery
(target).after(element);
// Vanilla JS
target.insertAdjacentElement('afterend', element);
append: // jQuery
$(parent).append(el);
// Vanilla JS
parent.appendChild(el);
css: // jQuery
$(el).css('color', 'black');
// Vanilla JS
el.style.color = 'black';
That jQuery equivalent page is like 5+ years old. Now, there are easier APIs for the few lengthy vanilla JS that remain on that page. |
|
is not equivalent with .css()
About my typo , I am not a native english speacker and words like query , queue , still, until are hard for me to remember when to double some letter, spell checker will help but jQuery is not in the dictionary and when I code I use $ and never the full name.
In my use case jQuery is the best tool and I am not sure why you need to contradict someone with daily experience , is so hard to admit that the API is nicer, that it fixes browser differences ? Do you lose some points or pride or other ego related stuff? Do you think you win some credit when you find a typo and use that to attack me? Can you explain what is happening in your mind when you type this ?
Go on that page and look at /is() pr /widthy() and not cherry pick stuff or incomplete implementation like you did for .css()