image show in class jquery code example
Example 1: input search picture jquery
$(document).ready(function() {
var images = $(".item")
$("#filter").on("change paste keyup", function(){
$.each(images, function(i, l){
$(l).hide();
});
searchValue = $("#filter").val();
searchValueRE = new RegExp(searchValue, "i");
output = $.grep(images, function (n) {return searchValueRE.test(n.className); });
$.each(output, function(i, l){
$(l).show();
});
});
});
Example 2: input search picture jquery
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<form id="live-search" method="post">
<fieldset>
<input type="text" class="text-input" id="filter" />
<span id="filter-count"></span>
</fieldset>
</form>
<br/>
<br/>
<div id="gallery">
<div class="item #1 Category-Home Home">
<a id="#image-link" target="_blank" a href="">
<img class="img_item"><img src="http://placehold.it/150x151" />
</a>
</div>
<div class="item #2 Category-Kitchen Kitchen">
<a id="#image-link" target="_blank" a href="">
<img class="img_item"><img src="http://placehold.it/150x152" />
</a>
</div>
<div class="item #3 Category-Outdoors Outdoors">
<a id="#image-link" target="_blank" a href="">
<img class="img_item"><img src="http://placehold.it/150x153" />
</a>
</div>
<div class="item #4 Category-Sports Sports">
<a id="#image-link" target="_blank" a href="">
<img class="img_item"><img src="http://placehold.it/150x154" />
</a>
</div>
</div>