Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
jquery.quicksearch
Advanced tools
A jQuery plugin for searching through tables, lists, etc quickly
A jQuery based plug-in for filtering large data sets with user input
This is an improved fork of the original work of riklomas https://github.com/riklomas/quicksearch. This plugin is now maintained by @DeuxHuitHuit
Note that the usage has changed in the latest version of quicksearch, the code is not backwards compatible, the form and input are not build by the script any more.
$(input_selector).quicksearch(elements_to_search, options);
/* Example form */
<form>
<input type="text" id="search">
</form>
/* Example table */
<table>
<tbody>
<tr>
<td>Test cell</td>
<td>Another test cell</td>
</tr>
</tbody>
</table>
<script src="jquery.js"></script>
<script src="jquery.quicksearch.js"></script>
<script>
$('input#search').quicksearch('table tbody tr');
</script>
<th>
elements on a table row$('input#search').quicksearch('table tbody tr', {
selector: 'th'
});
var qs = $('input#id_search_list').quicksearch('ul#list_example li');
$('ul#list_example').append('<li>Loaded with Ajax</li>');
qs.cache();
var qs = $('input#search').quicksearch('table tbody tr');
$.ajax({
'type': 'GET',
'url': 'index.html',
'success': function (data) {
$('table tbody tr').append(data);
qs.cache();
}
});
minValLength
option.Functions are always call
'd or apply
'd, so except this
to be the plugin object.
For example:
$('input#search').quicksearch('table tbody tr', {
'delay': 100,
'selector': 'th',
'stripeRows': ['odd', 'even'],
'loader': 'span.loading',
'noResults': 'tr#noresults',
'bind': 'keyup keydown',
'minValLength': 2,
'removeDiacritics': true,
'onBefore': function () {
console.log('on before');
},
'onAfter': function () {
console.log('on after');
},
'onValTooSmall': function (val) {
console.log('value ' + val + ' is too small');
},
'show': function () {
$(this).addClass('show');
},
'hide': function () {
$(this).removeClass('show');
}
'prepareQuery': function (val) {
return new RegExp(val, "i");
},
'testQuery': function (query, txt, _row) {
return query.test(txt);
}
});
If you have a bug fix, the best way to help would be to:
dev
branchbranch
I can't promise to answer every question about quicksearch, but please do report bugs here.
Now licensed under the MIT License: http://deuxhuithuit.mit-license.org
jQuery quicksearch was made by Rik Lomas at Lomalogue. It is now maintain by Deux Huit Huit
Thanks to Seth F. for fixes and Krzysiek Goj for the testQuery and prepareQuery option updates
FAQs
A jQuery plugin for searching through tables, lists, etc quickly
The npm package jquery.quicksearch receives a total of 3,529 weekly downloads. As such, jquery.quicksearch popularity was classified as popular.
We found that jquery.quicksearch demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.