Apple Spotlight type search on the site

Posted on July 3, 2005 | Filed Under Apple, Internet, Mac OS X, WordPress 

I did some reading over the weekend on what it would take to implement “live searching” on the site. What I mean by that is searching a Web site in a similar way to how Apple has implemented live searching on a Macintosh using Spotlight.

This morning I decided to take the plunge and after toying around off and on today I got it pretty much done. I still have to work on the CSS a bit more, but it’s functional.

It should work on most browsers, although it doesn’t for sure on IE for the Mac — then again who cares. If you use Safari, you even get the rounded corners and drop shdows.

So, to use the live search function just click in the search box and start typing. Results should popup under the search window almost immediately; using your arrow keys (or mouse) scroll down to the story you want and hit enter. If you want to exit out of search, just hit the Escape key on your keyboard.

Related Content

  • A Blob on the site
  • Safari supports new CSS properties; other browsers behind
  • Why Does Windows have to be so stupid!
  • Working with CSS drop shadows and image galleries
  • Posting from my iPhone

  • Comments

    9 Responses to “Apple Spotlight type search on the site”

    1. Eric on July 3rd, 2005 7:54 pm

      Man, that’s impressive. It’s quite fast! Cool feature!

    2. Jim Dalrymple on July 3rd, 2005 8:06 pm

      Excellent! Glad to hear it works for you Eric.

      Marg was having some trouble earlier, but all seems fine now.

    3. flargh on July 3rd, 2005 11:15 pm

      Works for me now, too, Jim.

    4. Jim Dalrymple on July 3rd, 2005 11:20 pm

      Ah, great — I forgot it didn’t work for you either. FWIW, the live search found the new story right away. As soon as it was posted, I did a search and there it was.

      And you weren’t banned — I guess you’re not a spammer ;-)

    5. Derik on July 4th, 2005 12:04 pm

      Very slick Jim. Did you code this yourself or did you get it from somewhere? I’d love to have something like this for my own site.

    6. Jim Dalrymple on July 4th, 2005 12:49 pm

      Hey Derik. A little bit of both — there is no way I could have coded the JavaScript. I still have some work to do with it though.

    7. Derik on July 5th, 2005 12:34 am

      Very cool at any rate Jim. Once you feel like you’re done working with it, shoot me over a copy if you can. :)

    8. Jim Dalrymple on July 5th, 2005 1:45 am

      No problem at all.

    9. Doug on February 17th, 2006 5:24 pm

      I found this entry and would be interested in seeing the example. Is it still around? Thanks.

    Leave a Reply