showing results for - "if else condition on hide and show in jquery"
Axel
19 Sep 2020
1<script type="text/javascript">
2  $(document).ready(function(){ 
3    $(".fil-cat").click(function(){
4      var val = $(this).attr('id');
5      if(val == 'allCat'){
6        $('.main-card').show();
7      }else {
8        $('.main-card').hide();
9        $('.'+ val).show();
10      }
11      
12    });
13   });
14</script>