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

Line 1: Line 1:
 
{{Pasteur_Paris}}
 
{{Pasteur_Paris}}
 +
<head>
 +
<script type="text/javascript">
 +
 +
/** Fonction basculant la visibilité d'un élément dom
 +
* @parameter anId string l'identificateur de la cible à montrer, cacher
 +
*/
 +
function toggle(anId)
 +
{
 +
node = document.getElementById(anId);
 +
if (node.style.visibility=="hidden")
 +
{
 +
// Contenu caché, le montrer
 +
node.style.visibility = "visible";
 +
node.style.height = "auto"; // Optionnel rétablir la hauteur
 +
}
 +
else
 +
{
 +
// Contenu visible, le cacher
 +
node.style.visibility = "hidden";
 +
node.style.height = "0"; // Optionnel libérer l'espace
 +
}
 +
}
 +
</script>
 +
<script type="text/javascript">
 +
jQuery(".chosen-select").chosen({
 +
    disable_search_threshold:10,
 +
    no_results_text: "Oops, nothing found!",
 +
    width: "95%"
 +
});
 +
</script>
 +
<script type="text/javascript">
 +
$("#filters").chosen().change(function(event) {
 +
    alert(test);
 +
    //console.log('select2 change', event, $(event.target).val());
 +
});
 +
</script>
 +
</head>
 
<html>
 
<html>
  
Line 6: Line 43:
  
 
<div class="contenu">
 
<div class="contenu">
 +
<form id="filters">
 
Search for a content:
 
Search for a content:
 
<!-- multiple dropdown -->
 
<!-- multiple dropdown -->
Line 15: Line 53:
 
<option selected="selected">Dojo Toolkit</option>
 
<option selected="selected">Dojo Toolkit</option>
 
</select>
 
</select>
<script type="text/javascript">
+
</form>
jQuery(".chosen-select").chosen({
+
    disable_search_threshold:10,
+
    no_results_text: "Oops, nothing found!",
+
    width: "95%"
+
});
+
</script>
+
 
   <ul>
 
   <ul>
 
     <li> June : </li>
 
     <li> June : </li>

Revision as of 08:35, 17 July 2015

<head> <script type="text/javascript">

/** Fonction basculant la visibilité d'un élément dom

  • @parameter anId string l'identificateur de la cible à montrer, cacher
  • /

function toggle(anId) { node = document.getElementById(anId); if (node.style.visibility=="hidden") { // Contenu caché, le montrer node.style.visibility = "visible"; node.style.height = "auto"; // Optionnel rétablir la hauteur } else { // Contenu visible, le cacher node.style.visibility = "hidden"; node.style.height = "0"; // Optionnel libérer l'espace } } </script> <script type="text/javascript"> jQuery(".chosen-select").chosen({

   disable_search_threshold:10,
   no_results_text: "Oops, nothing found!",
   width: "95%"

}); </script> <script type="text/javascript"> $("#filters").chosen().change(function(event) {

   alert(test);
   //console.log('select2 change', event, $(event.target).val());

}); </script> </head>

Notebook

Search for a content: