skip to Main Content

Toggle CSS onmouseover – WordPress Menu

I have a wordpress menu in which every links a custom class. Onmouseover, I'd like this class to change the css of another element in the page. I tried without success: $('.menuclass').onmouseover(function () {$('.other-element').toggleClass("hover");}); I might go the wrong way…

VIEW QUESTION

Jquery – I need to give an element the same class as another element

<div class='topnav' id='myTopnav'> <div class='dropdown'> <button class=' dropbtn'>Adobe ▼</button> <div class='dropdown-content'> <a href='index'>Photoshop</a> </div> </div> </div> <script> jQuery(function($) { var path = window.location.href; $('#myTopnav a').each(function() { if (this.href === path) { $(this).addClass('active'); $(this).parent().parent('first-child').addClass('active'); } }); }); </script> I am not…

VIEW QUESTION

disable li items in navigation bar HTML

I have a simple navigation bar, this is the HTML <body> <header> <nav class="menubar"> <ul class="menulist"> <li id="login" class="login"><a href="login.html">Login</a></li> <li id="settings" class="settings"><a href="settings.html">Settings</a></li> <li id="conf" class="conf"><a href="conf.html">Configuration</a></li> <li id="about" class="about"><a href="about.html">About</a></li> </ul> </nav> </header> </body> ul li { list-style:…

VIEW QUESTION
Back To Top
Search