Classe active

Classe active Bootstrap 4 - classe active (Résolu) » Forum - Javascript Bootstrap 3 - classe active (Résolu) » Forum - Javascript Liste des attributs de classe Active Director » Forum - Réseau Active les "classes (Résolu) » Forum - Wordpress Activer 3G samsung galaxy ace S5830 » Forum - Free mobile

Bonjour,

J'ai un menu bootstrap 4 comme suit:

 <nav class="navbar navbar-expand-lg navbar-dark bg-custom"> 	  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> 	    <span class="navbar-toggler-icon"></span> 	  </button>  	  <div class="collapse navbar-collapse" id="navbarSupportedContent"> 	    <ul class="navbar-nav mr-auto ml-auto"> 	      <li class="nav-item <gras>active</gras> dropdown"> 	        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 	          Jeux de mots 	        </a> 	        <div class="dropdown-menu" aria-labelledby="navbarDropdown"> 	          <a class="dropdown-item" href="<?= $jeu[0][0] ?>" target="_blank"><?= $jeu[0][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $jeu[1][0] ?>" target="_blank"><?= $jeu[1][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $jeu[2][0] ?>" target="_blank"><?= $jeu[2][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $jeu[3][0] ?>" target="_blank"><?= $jeu[3][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $jeu[4][0] ?>" target="_blank"><?= $jeu[4][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $jeu[5][0] ?>" target="_blank"><?= $jeu[5][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $jeu[6][0] ?>" target="_blank"><?= $jeu[6][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $jeu[7][0] ?>" target="_blank"><?= $jeu[7][1] ?></a> 	        </div> 	      </li> 	      <li class="nav-item"> 	        <a class="nav-link" href="//www.programme.tv" target="_blank">Programmes Tv</a> 	      </li> 	      <li class="nav-item dropdown"> 	        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 	          Liens utiles 	        </a> 	        <div class="dropdown-menu" aria-labelledby="navbarDropdown"> 	          <a class="dropdown-item" href="<?= $link[0][0] ?>" target="_blank"><?= $link[0][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $link[1][0] ?>" target="_blank"><?= $link[1][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $link[2][0] ?>" target="_blank"><?= $link[2][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $link[3][0] ?>" target="_blank"><?= $link[3][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $link[4][0] ?>" target="_blank"><?= $link[4][1] ?></a> 	        </div> 	         	      </li> 	      <li class="nav-item dropdown"> 	        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 	          Administrations 	        </a> 	        <div class="dropdown-menu" aria-labelledby="navbarDropdown"> 	          <a class="dropdown-item" href="<?= $adm[0][0] ?>" target="_blank"><?= $adm[0][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $adm[1][0] ?>" target="_blank"><?= $adm[1][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $adm[2][0] ?>" target="_blank"><?= $adm[2][1] ?></a> 	          <div class="dropdown-divider"></div> 	          <a class="dropdown-item" href="<?= $adm[3][0] ?>" target="_blank"><?= $adm[3][1] ?></a> 	        </div> 	      </li> 	      <li class="nav-item"> 	        <a class="nav-link" href="<?= 'index.php?p=galerie '?>">Galerie</a> 	      </li> 	      <li class="nav-item"> 	        <a class="nav-link" href="<?= 'index.php?p=video' ?>">Video</a> 	      </li> 	    </ul> 	  </div> 	</nav> 

Comment puis-je activer et désactiver la classe "active" en jQuery ?
Merci de votre aide
Cordialement

Forum

Classe active Bootstrap 4 - classe active (Résolu) » Forum - Javascript Bootstrap 3 - classe active (Résolu) » Forum - Javascript Liste des attributs de classe Active Director » Forum - Réseau Active les "classes (Résolu) » Forum - Wordpress Activer 3G samsung galaxy ace S5830 » Forum - Free mobile

Web: www.shapebootstrap.net

1 réponse

Marsh

NOVEMBER 9, 2013 AT 9:15 PM

Bonjour,


Comment puis-je activer et désactiver la classe "active" en jQuery ?

https://api.jquery.com/addclass/
https://api.jquery.com/removeclass/

Ou encore
http://api.jquery.com/toggleclass/

Reply

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed