News for hackers. Stuff that matters.
Re:Bootstrap-switch by mbell on Saturday August 10, 2013 @07:13PM (#6193025)
This has actually been problematic for me and I'm sure others. I'm currently working on an app that is Angular based and trying as hard as I can to avoid a jQuery dependency, mostly because I have no direct use for it and would rather avoid the dependency as it is rather large in file size, actually my largest. I've gone through multiple states of 'this library fits my needs right now and is fast to implement, but I need jQuery' using it, then immediately placing a TODO to get rid of it ASAP when I have time to work something else into being what I want.

This comment shouldn't be taken as a rant or complaint, I know why the current state of libraries is what it is, just an observation that jQuery seems to be, at least for me, transitioning from being 'an assumption' into 'the thing I want to get rid of'.

Re:Bootstrap-switch by RaphiePS on Sunday August 11, 2013 @12:03AM (#6193789)
I could be wrong, but if you use a CDN, won't jQuery be already cached for 99% of users? I can definitely imagine that filesize is an issue with less popular frameworks, but I'd wager that it really doesn't matter with jQuery.

If anyone has statistics on this, I'd love to see them!

Re:Bootstrap-switch by shadeless on Sunday August 11, 2013 @10:27AM (#6195025)
You're in fact wrong, the chance that users will have exactly the same version of jQuery cached is pretty small. [1] If you want to read more about jQuery on cdns, there is a long discussion on html5boilerplate github page. [2]

[1] http://statichtml.com/2011/google-ajax-libraries-caching.htm...

[2] https://github.com/h5bp/html5-boilerplate/pull/1327

Re:Bootstrap-switch by RaphiePS on Sunday August 11, 2013 @07:04PM (#6196705)
Well dang, thanks for pointing out my error and providing sources to back it up.
Re:Bootstrap-switch by arnarbi on Saturday August 10, 2013 @09:11PM (#6193327)
If you are using Angular already, you have a lite jQuery lib loaded. Perhaps it covers the cases you want to use jQuery for?

http://docs.angularjs.org/api/angular.element

Re:Bootstrap-switch by mbell on Saturday August 10, 2013 @09:51PM (#6193465)
I've tried this but have found that in almost all cases jqLite doesn't implement something needed for a given lib. Moreover, a single lib not working with jqLite spoils the entire thing.
Re:Bootstrap-switch by quarterto on Sunday August 11, 2013 @03:38AM (#6194223)