I am filtering a list when a checkox is clicked.I wanna find out if the list is empty, after filtering the list and i want to set a empty text on the list(if there are no li) saying No Data Found. Filter function on check box click:
$('.chk_box').change(function() {
if ($('input:radio[name=star1]:checked').val()==1) {
$("#mainpanel").fadeOut(500);
$("#allapps >li").hide();
$("#allapps >li[data-rate-filter=1]").show();
} else if ($('input:radio[name=star1]:checked').val()==2) {
$("#mainpanel").fadeOut(500);
$("#allapps >li").hide();
$("#allapps >li[data-rate-filter=2]").show();
}
});
i tried $("#mylistid li").length, but its not giving the length after filtering.