Difference between revisions of "Team:Pasteur Paris/test"

 
(4 intermediate revisions by the same user not shown)
Line 82: Line 82:
 
     disable_search_threshold:10,
 
     disable_search_threshold:10,
 
     no_results_text: "Oops, nothing found!",
 
     no_results_text: "Oops, nothing found!",
     width: "110%"
+
     width: "105%"
 
});
 
});
 
//Fonction de détection d'un changement dans le champ recherche
 
//Fonction de détection d'un changement dans le champ recherche
Line 95: Line 95:
 
     }
 
     }
 
     else{
 
     else{
      for (var filter in filters) {
+
//AND STATEMENT
 +
      //Construct filter string
 +
      var filtersString = '';
 +
      for (var filter in filters) {
 +
          filtersString = filtersString+'.'+filters[filter];
 +
      }
 +
      var elems = document.querySelectorAll(filtersString);
 +
      //for each elemnts containing all the tags, show it in the document
 +
      for(i = 0; i < elems.length; i++){
 +
          var week = elems.item(i);
 +
          week.style.display = "inline";
 +
      }
 +
//OR STATEMENT
 +
/*      for (var filter in filters) {
 
           //Select all elements with class with filter
 
           //Select all elements with class with filter
 
           var elems = document.querySelectorAll('.'+filters[filter]);
 
           var elems = document.querySelectorAll('.'+filters[filter]);
Line 104: Line 117:
 
           }
 
           }
 
       }
 
       }
 +
*/
 
     }
 
     }
 
});
 
});
Line 110: Line 124:
 
<button type="button" id="btn_hide">Hide</button>
 
<button type="button" id="btn_hide">Hide</button>
 
<script type="text/javascript">
 
<script type="text/javascript">
$('#btn_hide').click(function() {
+
//$('#btn_hide').click(function() {
     //alert('test');
+
     //toggle('week2');
    toggle('week2');
+
//});
});
+
 
</script>
 
</script>
 
   <ul>
 
   <ul>

Latest revision as of 12:38, 17 July 2015

Notebook

Search for a content: