jquery plugin for HID barcode scanner
// with default values
$('#bcscanner').bcscanner();
// with custom options
$('#bcscanner').bcscanner({
hidden: true,
interval: 300,
onChar: [{
charCode: 13,
func: function() {
alert("enter was hit");
}
}, {
charCode: 32,
func: function() {
alert("space was hit");
}
}]
});
hidden (boolean)
- true, input field will be moved out of visible area
- false, input field stays in position
default is true
the interval (in ms) in which the field requests the focus. If interval < 0 the focus will not be requested.
default is 50
Defines functions depending of a charCode
{
charCode: 13,
func: function(input, event) {
alert("enter was hit");
}
}
starts the focus requesting interval
stops the focus requesting interval
removes bcscanner