Earlier quoted context omitted.
Yes, it's extremely common to call jQuery from, for example, Google's googleapis.com domain. Here's a quick sampling from a random group of top sites: stackoverflow.com (googleapis.com), kickstarter.com (googleapis.com), cnn.com (their own cdn), businessinsider.com (jquery.com), foxnews.com (their own cdn), nbcnews.com (aspnetcdn.com), espn.com (espncdn.com), tumblr.com (secure.assets.tumblr.com), lastfm.com (googlea…
Just a passing tinfoil comment... Google has so many fingers in the analytics pie, if you're not being recorded by Adsense or Analytics, then there's always CDN. No idea if it's all linked up, but it means that using alternative search engines doesn't really matter if you still visit Google-enhanced destinations.
Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
31–40 of 145 posts
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#32Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#33Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#34Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#35Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#36Earlier quoted context omitted.
What exactly would you miss (other than some utilities like each(), which are I would like to keep out of the library)? Actually one of the ways I used to decide what features to squeeze in was making a list of all jQuery functions and re-implementing the functionality with Minified. To make sure that I don't miss anything important. There are some things that are more complicated to do, because you need to work with…
Sizzle is actually a big one, CSS1 doesn't really cut it for anything but the most trivial use cases, although if you're only targeting modern browsers than I guess you can rely on their support. Also, if you don't support each, I assume you don't support method chaining on enumerables? As for actual missing features, the jQuery data stuff is really useful, but if the intention is to use minified with something like…
You can chain list methods, as in $('li').filter(function(v, index) { return index%2;}).set({$backgroundColor: '#000'}).animate({$backgroundColor: '#fff'}) to fade every second list element from black to white. The number of collection functions is limited to a minimum though. The Util module will add a lot more collection features (but at a cost of another 4kb).
Yes, that's true, data() is something I intentionally omitted because I don't think that it's worth its bytes today. For simple lower level effects toggle() offers a very different approach of handling state, and for larger apps you should use a MVC framework, as you suggested.
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#37Sure, I can switch my code to use this, but how compatible is this with common 3rd party libraries that are dependent on jquery? For example, will this run the bootstrap js code ok? If it doesn't run that code cleanly, then we are still stuck importing jquery.
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#38Earlier quoted context omitted.
Just a passing tinfoil comment... Google has so many fingers in the analytics pie, if you're not being recorded by Adsense or Analytics, then there's always CDN. No idea if it's all linked up, but it means that using alternative search engines doesn't really matter if you still visit Google-enhanced destinations.
Of course it's all linked up, including other freebies such as Google Fonts. Why else would they be offering it for free.
Re: Show HN: Minified.js – a fully-featured, 4K alternative to jQuery and MooTools
#39It's nice to see a library use Closure Compiler's advanced compilation mode.
BTW to get down to the final size of 4089, I compress the source code with Closure Compiler in Advanced Mode, and then compress again using UglifyJS to get rid of the last 20 bytes. Closure is not perfect...