Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

sp4ce/jquery-plugin

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tapir jQuery plugin

A plugin that makes searching with Tapir a breeze!

Check out the live example

Using the plugin

1. Make sure you have jQuery in your site (any version above 1.2 should work).
2. Add the jquery-tapir.min.js file to your site.
3. Call tapir() on the element you want the results to appear in (don’t forget to pass your token!).

example:


  <!DOCTYPE html>

  <html>
    <head>
      <meta charset="utf-8">
      <title>Tapir jQuery plugin example</title>
    </head>

    <body>

      <div id="search_results"></div>

      <script src="jquery-1.6.1.min.js"></script>
      <script src="jquery-tapir.min.js"></script>
      <script>
        $('#search_results').tapir({'token': '4dbfc79e3f61b05b53000021'});
      </script>

    </body>
  </html>

Options

Complete

If you pass a function as a complete-option, your function will be executed when the search is complete and the results have been returned, right before they’re appended to the page:

$('#search_results').tapir({
  'token': '4dbfc79e3f61b05b53000021',
  'complete' : function() { alert("I'm done searching!"); }
});

Query parameter option

By default, the query parameter is ‘query’, but with the query_param option, you can change it to what ever you want.

Query option

If you directly specify the query option, the library will do a call with the given option and display the result in the element.

About

Official TapirGo JQuery plugin

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.