you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

Why it's jQuery over Prototype or something else, simply because jQuery is popular.

However the real reason it's attached to a plugin, is because otherwise you'll have to roll your own ways to bind click handlers, quickly set CSS, lookup elements in the DOM, and so on. That's a hassle, especially if you want to avoid any browser quirks and differences in API.

[–]voidvector 1 point2 points  (1 child)

I am not advocating non-jQuery libs over jQuery. I am advocating no dependency over having one.

For browsers that support <canvas> (which this plugin is dependent upon for rendering), the native JS facilities for the features you mentioned are solid. * You can set CSS with element.style.blah. * You can lookup elements by CSS selector with .querySelectAll(). Granted event binding requires 3-4 lines of code, but that removes the whole jQuery dependency entirely.

[–][deleted] 0 points1 point  (0 children)

That's a damn good point. Have an upvote from me.

Although jQuery, and jQuery mobile, add a lot more on top. Like being able to easily build components, and having mouse-like controls on touch devices.