$('#artsearch').keyup(function(){
var searchtext = $('#artsearch').val();
if(searchtext.length >= 3){
$('#photoPreview .file-row').each(function(){
var $this = $(this);
var $text = $this.find('.arttitle .name').text();
var indexcount = $text.indexOf(searchtext);
if(indexcount > -1){
$this.show();
}else{
$this.hide();
}
});
}
if(searchtext.length == 0){
$('#photoPreview .file-row').show();
}
});
Shopify, Shopify Apps, Magento, WordPress, Codeigniter, Joomla, Big Commerce | PHP
Thursday, 10 November 2016
Search with jQuery / Javascript
Labels:
Javascript,
jQuery,
Search
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment