Closed Los closed 8 years ago
Hi, What do you mean? Where? Which file?
$('#faqSearch').hideseek({ list: '.faqItem', ignore: '.collapse' });
I just want to show a div when it get no results.
Hi, the "_after_nodata" event is just added in order to trigger an action when there are no results. So, now you can do something like this:
$('#search').on("_after_nodata", function() {
$('.my_custom_no_results_div').show();
});
Assuming there is an element like this:
<div class="my_custom_no_results_div" style="display:none">
<span>No results!</span>
</div>
Awesome! Thanks!
I found using the above code worked, but on re-searching with a found element, the no results part still displayed. I have made an incredibly hacky way around it, but would it be possible to use a callback/function as a valid entry for the nodata option? That way, someone could either specify some text to display, or their own function?
There's some way to show a div or html element when there's no result? Or just apply a class by .addClass option?
Thanks