javascript - How to make appear only boxes which contain the searched word - jQuery -


i shared screenshot, when write keyword, example "user", boxes containing "user" appears, , other disappear.

i need whole explanation. static html 1 page website, without php or server side. know if "filtering" feasible done , how.

enter image description here

i thing should start search this:

$( "containerclass" ).each(function() {   var txt =$( ).text();   if( txt.includes(searchterm))   {$( ).show();}   else{$( ).hide();} }); 

just remember includes case sensitive.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -