We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi-
As of version 1.8, Live Search is broken.
The error is here: https://github.com/nakajima/jquery-livesearch/blob/master/src/jquery.livesearch.js#L5
To fix, please see: http://stackoverflow.com/questions/2196641/how-do-i-make-jquery-contains-case-insensitive-including-jquery-1-8
Code:
jQuery.expr[":"].Contains = jQuery.expr.createPseudo(function(arg) { return function( elem ) { return jQuery(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; }; });
To maintain 1.7 compatibility, I wrote a little if test using the jQuery version function here: http://stackoverflow.com/questions/2655308/jquery-version-compatibility-detection/3113707#3113707
/** jQuery < 1.8 */ if ($.isVersion('1.8', '<')) { $.extend($.expr[':'], { 'containsi': function(elem, i, match, array) { return $(elem).text().toLowerCase() .indexOf((match[3] || "").toLowerCase()) >= 0; } }); } else { /** jQuery > 1.8 */ jQuery.expr[":"].containsi = jQuery.expr.createPseudo(function(arg) { return function( elem ) { return jQuery(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0; }; }); }
Of course, using the if statement is okay for my project but it may add unnecessary weight to the live search plugin.
-Greg
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi-
As of version 1.8, Live Search is broken.
The error is here:
https://github.com/nakajima/jquery-livesearch/blob/master/src/jquery.livesearch.js#L5
To fix, please see:
http://stackoverflow.com/questions/2196641/how-do-i-make-jquery-contains-case-insensitive-including-jquery-1-8
Code:
To maintain 1.7 compatibility, I wrote a little if test using the jQuery version function here:
http://stackoverflow.com/questions/2655308/jquery-version-compatibility-detection/3113707#3113707
Of course, using the if statement is okay for my project but it may add unnecessary weight to the live search plugin.
-Greg
The text was updated successfully, but these errors were encountered: