jQuery Plugin For Direct Search In Browser - anysearch.js

File Size: 44.8KB
Views Total: 1465
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
jQuery Plugin For Direct Search In Browser - anysearch.js

anysearch.js is a simple jQuery plugin that allows you to directly perform a search browser with barcode scanner support.

How to use it:

1. Include the latest JQuery javascript library on your web page.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

2. Include anysearch.js and anysearch.css on your page.

<link href="css/anysearch.css" rel="stylesheet">
<script src="js/anysearch.js"></script>

3. Usage.

$(document).ready(function() { 
        searchFunc: function(search) {

4. Available options.

reactOnKeycodes: 'string',
secondsBetweenKeypress: 2, // puffer between keypress
searchPattern: {1: '[^~,]*'}, // * // use http://txt2re.com/ 
minimumChars: 3, // minimum amount of keypressed chars before its possible to search,
liveField: false, // if one of this elements is focused -> do not check keypress
// {selector: '#example', value: true} or 
// {selector: '#example', html: true} or
// {selector: '#example', attr: the attribute}
excludeFocus: 'input,textarea,select', // if element is focused disable anysearch
enterKey: 13, // 13 == Enter
backspaceKey: 8, // 8 == Backspace
checkIsBarcodeMilliseconds: 250, // milliseconds between keypressed string to check if is barcodescanner 
checkBarcodeMinLength: 4, // minimum length of the barcode
searchSlider: true, // searchslider active or not
startAnysearch: function() {
}, // Action if start keypress
stopAnysearch: function() {
}, // Action if keypress processed
minimumCharsNotReached: function(string, stringLength, minLength) {
}, // Acdtion if minimum chars is not reached
searchFunc: function(string) {
}, // executes function if press the enterKey
patternsNotMatched: function(string, patterns) {
}, // action if all pattern not matched
isBarcode: function(barcode) {
} // action if barcode input detected

About author:

Author: Jev

Homepage: http://www.jevnet.de

Project Homepage: http://www.jevnet.de/anysearch-js.html

This awesome jQuery plugin is developed by JevW. For more Advanced Usages, please check the demo page or visit the official website.