Tumblr AJAX (Inline) Search
I’ve been using the wonderful AJAX Tumblr search by Jacob DeHart for quite a while. It’s excellent, but I decided to add a few things to it. Primarily:
- Remove embedded jQuery, and instead link to Google hosted version.
- Add variable for maximum number of results.
- Add variable for maximum title length.
- Link to full (official Tumblr) search results.
- Searches tags.
- Change result boxes to be anchor tags rather than divs.
- List number of results available.
- Append “type” class to result boxes (to allow for custom backgrounds).
- Reduce Tumblr API calls by increasing posts per request (still testing performance of this)
You can try all these to the right.
Anyway, my code is here;
http://lab.bandit.co.nz/sites/tumblr/bandit-tumblr.js
You’ll need to include the following in your <head> tags if you use my script;
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" language="javascript" type="text/javascript"></script>
My related CSS (if you want it) is here;
http://lab.bandit.co.nz/sites/tumblr/bandit-tumblr-search.css
Icons (if you want them) can be found here;
http://lab.bandit.co.nz/sites/tumblr/bandit-tumblr-icons.zip
Enjoy!
James
Loading...
