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.
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
Post a Comment