Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login
ƒu.js (tsenart.github.com) similar stories update story
18.0 points by tsenart | karma 459 | avg karma 3.38 2011-01-27 07:10:21+00:00 | hide | past | favorite | 27 comments



view as:

what does it do?

More importantly, what does it do that's worth having to remember how I make a unicode ƒ?

ALT + f on a mac, not too hard. but I agree

ctrl+shit+u 192 on ubuntu for ƒ.

might as well have used the snow man ?('body').style.background = '#f4f6f8';

call it brr.js


and ALT+0131 on the numpad on windows

Using ƒ for selectors in your JavaScript might be a subtle way to say "I developed this on a Mac, because no way in hell would I type this character 37 times on Windows or Linux".

Something like `echo -e 'include "/usr/share/X11/locale/en_US.UTF-8/Compose"\n<Multi_key> <f> <slash> : "ƒ"' > ~/.XCompose` would do the thing.

Ah, now that's a welcoming intro paragraph for the README.

You can also use ß or fu.

It looks like it lets you use jQuery-style selectors to get at elements on a page.

Why use it vs jquery?

If all you wanted was to use jQuery-style selectors then this file is only ~3kb compared to jQuery which is like ~180kb (uncompressed).

Does this support a decent selection of browsers?

Lol people, I don't know. I didn't make this and I've never seen it before today. I'm doing the same research here that you guys could be doing.

Couldn't you just use Sizzle directly?

If you link to jQuery on Google's CDN, changes are pretty high that it's already cached by the browser.

Yes. The minified version is much smaller and after gzipping it's around 20kb or so. When using a CDN there is a chance that it's cached. I'm just stating the obvious here. Either way, the 7000 lines of JS that comprise jQuery are a lot and this seems like an alternative if you just need that single piece of functionality. Linking to Google's CDN is not without its own pitfalls though. I believe there have been discussions on HN in the past about this.

Not over SSL.

See http://hoisie.com/post/yes_browsers_do_cache_ssl_resources__...:

  This is a completely incorrect statement. All browsers cache SSL content, as long as you specify the correct Cache-Control headers. A simple curl request reveals that jquery served from Google's CDN has Cache-Control public.

Thank you for this!

It looks like it's just a more convenient way of calling "querySelectorAll" on elements (you can call it on arrays of elements, or with arrays of selectors, for example).

I'm not sure why you'd use it over Sizzle, unless you wanted to do something very small and specific.


Oi tsenart, tell us about this!

He is sleepy, guys. Let him collect some energy, he'll surely write more about it or destroy it next morning.

Transfer your interest to this(http://news.ycombinator.com/item?id=2157509) updated post.

Legal | privacy