jQuery Plugin - anysearch.js
- Direct search in browser
- Search without inputfield
- Activate searchfield optional
- Activate searchslider optional
- Supports barcode scanner
- Searchfilter
Demo and project site
http://www.jevnet.de/anysearch-js-demo.html
http://www.jevnet.de/anysearch-js.html
Usage & Setup
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() {
$(document).anysearch({
searchFunc: function(search) {
alert(search);
}
});
});
Options & configuration
You can find on the project site:
http://www.jevnet.de/anysearch-js.html
Example
$(document).ready(function() {
$(document).anysearch({
reactOnKeycodes: 'all',
secondsBetweenKeypress: 1,
searchPattern: {1: '[^~,]*'},
minimumChars: 3,
liveField: {selector: '#liveField', value: true},
excludeFocus: 'input,textarea,select,#tfield',
enterKey: 13,
backspaceKey: 8,
checkIsBarcodeMilliseconds: 250,
checkBarcodeMinLength: 6,
searchSlider: true,
startAnysearch: function() {
openHelp();
},
stopAnysearch: function() {
closeHelp();
},
minimumCharsNotReached: function(string, stringLength, minLength) {
alert(string + ' has ' + stringLength + ' chars! Minlength: ' + minLength);
},
searchFunc: function(string) {
doAjaxSearch(string);
},
patternsNotMatched: function(string, patterns) {
alert(string + ' must be in this form: ' + patterns);
},
isBarcode: function(barcode){
ajaxCheckBarcode(barcode);
}
});
});