maj css home + new js

This commit is contained in:
Jerome Morjon
2015-03-09 15:13:02 +01:00
parent 6ffe9e1f78
commit 544a9d5473
3 changed files with 26 additions and 10 deletions

View File

@ -47,8 +47,8 @@ body {
{
border: 7px solid white;
box-shadow: 0px 0px 3px black;
width: 250px;
height: 250px;
width: 250px !important;
height: 250px !important;
max-height : 250px;
max-width : 250px;
background: #ffffff; /* Old browsers */

View File

@ -0,0 +1,19 @@
// fonction qui recherche le referent donnee en parametre
function rechercherReferent()
{
// on recupere le mot cle rentrer dans le champs de recherche
var motCle = document.getElementById("searchfield").value;
//boucle sur chaque item
var list = document.getElementsByClassName("item");
for (var i = 0; i < list.length; i++)
{
referent = list[i].getElementsByClassName('nomRef')[0].innerHTML; //recupere le nom du referent referent
if (referent.indexOf(motCle) > -1) //on compare si la recherche correspond au nom
{
//on remplace la classe
list[i].className = "item active";
}
}
}