1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style>
.navigation {
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
margin: 0;
padding: 0;
list-style: none;
color: #fff;
width: 100%;
font: 1.2em "Trebuchet MS", sans-serif;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
}
.navigation a, .navigation span {
display: block;
padding: 4px 10px;
color: #fff;
text-decoration: none;
background-image: url(image/fondAccordeonViolet.png);
background-repeat: no-repeat;
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
}
.navigation .toggleSubMenu a, .navigation .toggleSubMenu span {
background-image: url(image/fondAccordeonViolet.png);
}
.navigation .open a, .navigation .open span {
background-color: #F00;
}
.navigation a:hover, .navigation a:focus, .navigation a:active {
text-decoration: none;
}
.navigation .subMenu {
font-size: .8em;
font-size: .9em;
margin: 0;
padding: 0;
background-image: url(image/gris.png);
}
.navigation ul.subMenu a {
background: none;
padding: 3px 20px;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script type="text/javascript">
<!--
$(document).ready( function () {
// On cache les sous-menus
// sauf celui qui porte la classe "open_at_load" :
$("ul.subMenu:not('.open_at_load')").hide();
// On selectionne tous les items de liste portant la classe "toggleSubMenu"
// et on remplace l'element span qu'ils contiennent par un lien :
$("li.toggleSubMenu span").each( function () {
// On stocke le contenu du span :
var TexteSpan = $(this).text();
$(this).replaceWith('<a href="" title="Afficher le sous-menu">' + TexteSpan + '</a>') ;
} ) ;
// pareil avec submenu2
$("ul.subMenu2:not('.open_at_load2')").hide();
$("li.toggleSubMenu2 span").each( function () {
var TexteSpan = $(this).text();
$(this).replaceWith('<a href="" title="Afficher le sous-menu">' + TexteSpan + '</a>') ;
} ) ;
// On modifie l'evenement "click" sur les liens dans les items de liste
// qui portent la classe "toggleSubMenu" :
$("li.toggleSubMenu > a").click( function () {
// Si le sous-menu etait deja ouvert, on le referme :
if ($(this).next("ul.subMenu:visible").length != 0) {
$(this).next("ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") } );
}
// Si le sous-menu est cache, on ferme les autres et on l'affiche :
else {
$("ul.subMenu").slideUp("normal", function () { $(this).parent().removeClass("open") } );
$(this).next("ul.subMenu").slideDown("normal", function () { $(this).parent().addClass("open") } );
}
// On empêche le navigateur de suivre le lien :
return false;
});
// pareil avec "toggleSubMenu2" :
$("li.toggleSubMenu2 > a").click( function () {
if ($(this).next("ul.subMenu2:visible").length != 0) {
$(this).next("ul.subMenu2").slideUp("normal", function () { $(this).parent().removeClass("open") } );
}
else {
$("ul.subMenu2").slideUp("normal", function () { $(this).parent().removeClass("open") } );
$(this).next("ul.subMenu2").slideDown("normal", function () { $(this).parent().addClass("open") } );
}
return false;
});
} ) ;
// -->
</script>
</head>
<body>
<ul class="navigation">
<li class="toggleSubMenu"><span>- Tambour Major</span>
<ul class="subMenu">
<?php include("include/confige.php");
include("include/fonction.php");
$select = 'select * FROM membres WHERE instru = "Tambour-Major" ';
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
while($row = mysql_fetch_array($result)) {
?>
<li><a href="#" onclick="document.getElementById('monImage').src ='image/membres/<?php echo $row["photo"];?>';document.getElementById('monImage').style.visibility='visible'; document.getElementById('monTexte1').innerHTML = '<?php echo $row["nom"].' '.$row["prenom"].' - '.$row["instru"];?> <br><br> Membre depuis <?php echo $row["inscri"];?>';document.getElementById('monTexte1').style.visibility='visible';"><?php echo $row["nom"].' '.$row["prenom"];?></a></li>
<?php
}
?>
</ul> </li>
<li class="toggleSubMenu"><span>- Tambour Major Remplaçant</span>
<ul class="subMenu">
<?php
$select = 'select * FROM membres WHERE nom = "Jordan" ';
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
while($row = mysql_fetch_array($result)) {
?>
<li><a href="#" onclick="document.getElementById('monImage').src ='image/membres/<?php echo $row["photo"];?>';document.getElementById('monImage').style.visibility='visible'; document.getElementById('monTexte1').innerHTML = '<?php echo convaffi($row["nom"]).' '.convaffi($row["prenom"]).' - '.$row["instru"];?> <br><br> Membre depuis <?php echo $row["inscri"];?>';document.getElementById('monTexte1').style.visibility='visible';"><?php echo convaffi($row["nom"]).' '.convaffi($row["prenom"]);?></a></li>
<?php
}
?>
</ul>
</li>
<li class="toggleSubMenu"><span>- Batteries</span>
<ul class="subMenu">
<li>
<?php
$select = 'select * FROM membres WHERE instru = "Batterie" ';
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
while($row = mysql_fetch_array($result)) {
?>
<a href="#" onclick="document.getElementById('monImage').src ='image/membres/<?php echo $row["photo"];?>';document.getElementById('monImage').style.visibility='visible'; document.getElementById('monTexte1').innerHTML = '<?php echo convaffi($row["nom"]).' '.convaffi($row["prenom"]).' - '.$row["instru"];?> <br><br> Membre depuis <?php echo $row["inscri"];?>';document.getElementById('monTexte1').style.visibility='visible';"><?php echo convaffi($row["nom"]).' '.convaffi($row["prenom"]);?></a>
<?php
}
?>
</li>
</ul>
</li>
<li class="toggleSubMenu"><span>- Batteries</span>
<ul class="subMenu"><li>bjghjgjgfjgfj</li>
</ul>
</li>
<li><a href="#" title="Aller à la page 4">Item 4</a></li>
</ul>
</body>
</html> |
Partager