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


16 Responses to “Search jQuery API Docs from Spotlight”

  1. Robin says:

    Cool~~!

  2. Christopher says:

    Installed. Thanks!

  3. Ben Byrne says:

    Nice. Installed and working, very cool. Has anyone done this for, say, the PHP manual?

  4. Mika Tuupola says:

    Ben Byrne: Funny that you mention it. I thought to do the PHP manuals next.

  5. Tim Fletcher says:

    Mika, this is one of the coolest things I have ever found on the Intertubes. Great work!

  6. Mika Tuupola says:

    Tim Fletcher: Thanks! I though exactly the same when I saw Priit’s Ruby on Rails documentation. So it was really his idea. I just copied it to jQuery.

  7. Dan Oersnes says:

    This is so cool! Thanks!

  8. Alexandre Lopes says:

    Great work… Congratulations…

  9. sanbit says:

    Nice, but it doesnt’ have important methods such as get and put from Ajax.

  10. Mika Tuupola says:

    sanbit: Looks like I need to regenerate the docs. Thanks for the heads up!

  11. sanbit says:

    Thanks, please put a new blog post or new link up once you have a new version as I would like to get it, its very useful, thanks!!

  12. vigo says:

    how can we build our own dictionary? i would love to do some for PHP / PEARL / PYTHON… is there any documentation or “how to” about it?

  13. Mika Tuupola says:

    It is just XHTML with some additional instuctions for processing. You can start by reading Apple documentation for dictionary services.

  14. sven says:

    still thinking of doing the PHP one next? would be really cool.

  15. georges says:

    Any thoughts on making one for 1.4? They are providing an XML version now to help things along.

  16. Mika Tuupola says:

    georges: I just have to check how much the format has changed. If format is the same it is only 10 minutes work.

Leave a Reply



(will not be published)



(you can use Textile for formatting)