heyy,
i want to create some hover background link when mouseover in jquery !!!
when the mouse over on " .nav Menu nav a ", I add addclass " .hover " and when mouse out removeClass " .hover "
more info on my fiddle -> demo JS FIDDLE
HTML : > >
<a href="inc/about/" class="Load frame" id="html" data-html="about"> <div class="hover"></div> about </a> <a href="inc/porject/" class="Load frame" id="html" data-html="project"> <div class="hover"></div> project </a> <a href="inc/story/" class="Load frame" id="html" data-html="story"> <div class="hover"></div> story </a> <a href="inc/contact/" class="Load frame" id="html" data-html="contact"> <div class="hover"></div> contact </a>
CSS :
.navMenu nav { width: 100%; height: auto; list-style-type: none; margin: auto auto; text-align: center; } .navMenu a { height: 4em; width: 100%; text-decoration: none; text-transform: uppercase; text-align: center; display: block; line-height: 4em; font-weight: normal; font-size: 1em; color: rgba(238,79,87,1); position: relative; z-index: 100; } .hover{ /* add background, width, height, ect... */ }
JS:
function hoverLi(){
$(".navMenu a").hover(function(){ $(this).stop(true, true).addClass("hover"); },function(){ $(this).removeClass("hover"); }); }
thanks a lot