JSFiddle - React, Tailwind, and code Playground
HTML
<pre>
<input id="input_filter" type="text" >
</pre>
<div id="MaListe">
<div class="uneclasse">
<span class="div_class_items">jquery</span>
</div>
<div class="uneclasse">
<span class="div_class_items">Html</span>
</div>
<div class="uneclasse">
<span class="div_class_items">Php</span>
</div>
</div>
<div id="clic">clic</div>
CSS
.uneclasse{
padding:2px;
border:1px solid black;
}
JavaScript
$("#input_filter").bind("keyup", function() {
var text = $(this).val().toLowerCase();
var items = $(".div_class_items");
//first, hide all:
items.parent().hide();
//show only those matching user input:
items.filter(function () {
return $(this).text().toLowerCase().indexOf(text) == 0;
}).parent().show();
});
$('#clic').on('click', function(){
var search = document.getElementById("input_filter");
search.value = "html";
var items = $(".div_class_items");
items.filter(function () {
return $(this).text().toLowerCase().indexOf(text) == 0;
}).parent().show();
})