Search jQuery API Docs from Spotlight

Blog Projects
javascript jquery

Yesterday Priit Haamer of Fraktal notified me about Spotlight searchable Ruby on Rails documentation he had made. Absolutely brilliant idea. When I saw it I knew I have to do same thing for jQuery.

Note: Last update to jQuery Spotlight dictionary was done 19th November 2009. I try to update the docs every month.

Why Is It cool?

You can just hit Apple + Space to enter spotlight and search for jQuery function.

Press and hold Apple + Control + D over any function in TextMate (or Safari, iChat, Mail etc.) to get info popup.

Docs are in your harddrive so they are always accessible. Even when you or docs.jquery.com are offline.

It is native, based on OS X dictionary. No need to install AIR or any other applications.

Install From Zip

Download jQuery.dictionary.zip file. Unzip it and move to folder ~/Library/Dictionaries or /Library/Dictionaries. Enable it from Dictionary preferences.

Sometimes it takes a while for Spotlight to see new dictionary. You can speed things up by restarting it.

>killall Spotlight

According to Priit you should also drag new dictionary to be first on the list. This was not true in my case. However if you have problems it is worth trying.

Install From Git

If you like to live in bleeding edge install from Git and build your own.

>git clone git://github.com/tuupola/jquery_dictionary.git
>cd jquery_dictionary
>make
>make install

Acknowledgements

Thanks to Priit Haamer for the original idea. David Serduke for the the Python script used exporting jQuery wiki to XML format. J�rn Zaefferer whose XSLT stylesheets were used as basis for XSLT stylesheet which converts exported jQuery docs to OS X dictionary XML source



When asking a question please include an URL to example page where the problem occurs. If you have longer code examples please use pastie.org.
CATEGORIES
Built using the awesome Flat UI Pro framework by Designmodo.

© 2013 Mika Tuupola.