Advertisement
Marcelohenrique20

Untitled

Sep 25th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.    
  3. $(document).ready(function($) {
  4.    
  5.     var prods_banco = $('#produtos-do-js li[data-tags*="Esqui Chile"]');
  6.  
  7.     $( "#produtos-js" ).html("");
  8.  
  9.     for (var i = 0; i < prods_banco.length; i++) {
  10.  
  11.         prods_banco.eq(i).clone().appendTo( "#produtos-js" );
  12.     }
  13.  
  14.     for (var i = 0; i < $("#produtos-js li").length; i++) {
  15.  
  16.         $("#produtos-js li").eq(i).find("figure").attr("style",$("#produtos-js li").eq(i).find("figure").attr("data-style"));
  17.    
  18.     }
  19.  
  20.  
  21.     filtrarProdutos();
  22.  
  23.  
  24.  
  25. // $('#fitrar-feriado').on('change', function () {
  26.  
  27. //  alert('aSome')
  28.  
  29. //  $('#produtos-js li').hide();
  30.  
  31. //  if ($(this).val() != "") {
  32.  
  33. //      $('#produtos-js li[data-tags*="'+$(this).val()+'"]').fadeIn();
  34. //  }
  35.  
  36. //  else {
  37. //      $('#produtos-js li').fadeIn();
  38. //  }
  39.  
  40.    
  41.  
  42. // });
  43.  
  44.  
  45.  
  46.  
  47. });
  48.  
  49.  
  50.  
  51.  
  52. $(document).on('change', '#fitrar-feriado', function(event) {
  53.     // alert( this.value );
  54.  
  55.     $('#produtos-js li').hide();
  56.  
  57.     if (this.value  != "") {
  58.  
  59.         $('#produtos-js li[data-tags*="'+this.value +'"]').fadeIn();
  60.     }
  61.  
  62.     else {
  63.         $('#produtos-js li').fadeIn();
  64.     }
  65.  
  66. });
  67.  
  68.  
  69.  
  70.  
  71.  
  72. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement