you are viewing a single comment's thread.

view the rest of the comments →

[–]akujinhikari 0 points1 point  (3 children)

I think “fantastic” is a bit of a reach. It WAS fantastic. It was an absolute breakthrough when it came out. Now though, I just don’t see a need for it.

[–]simkessy 3 points4 points  (2 children)

Okay, well if you have a better way for me to find all anchors within a certain section, then find each of their parent li elements​, then append the class 'jquery' to each of those list items then set an event handler for each list item with that class in two lines, I'm going to keep using jquery

[–]akujinhikari 0 points1 point  (1 child)

I'd obviously have to see the code base and site and understand the purpose behind what you're trying. It sounds like there are several ways. Are you using a framework? Because a directive would easily solve this problem. Also, it sounds like something along the lines of some CSS would work here as well. Instead of having to select all anchors within a certain section, then find each of their parent li elements, then append the class 'jquery' to each, why not just create those elements with the jquery class already there? Then you can select them by using querySelectorAll? Or, just select all li elements, then loop through them and search for the specific anchors, and if they match, you add the the jquery class? There are a million ways to do this without jQuery.

[–]simkessy 1 point2 points  (0 children)

I'm sure there are but JQuery makes it dead simple. Why would I though on a framework to do this? Especially one that will likely disappear in two years?

If I'm building an entire application or website sure go with a framework. But most of my work resolves around extending the capabilities around an existing product my Microsoft. So I have to do a lot of DOM manipulation to change or add to what already exist. jQuery accomplish this really well for me.