Custom js isn't working
-
Hi,
Everything is ok but only javascript not working. I don’t know where can be problem, only it could be bad code.
This is my CSS:html,body{ margin:0; padding: 0; } html { box-sizing: border-box; } *, *:before, *:after{ box-sizing: inherit; } .container:before, .group:before, .menu:before, .container:after, .group:after, .menu:after { content: " "; display: table; } .container:after, .group:after, .menu:after{ clear: both; } .container, .group, .menu{ *zoom: 1; } /* ----------------------> Header <-------------------------- */ .menubar { width: 100%; height: 87px; background: #cccccc; } .logo h1 { float: left; font-size: 50px; margin: 0; } #menu-header { margin: 0; } #menu-header ul { position: relative; font-family: Arial; } nav ul ul.sub-menu { position: absolute; margin-top: 20px; display: none; } nav ul li { list-style-type: none; margin: 0; padding: 0; display: inline-block; float: left; } nav ul li a { display: block; color: #757575; } nav ul li ul li { float: none; display: block; } nav ul li a:hover{ border-bottom: 5px solid #2b81eb; } nav ul li ul li a { padding: 10px 30px; background: #cccccc; } nav ul li ul li a:hover{ border: none; padding: 10px 30px; } nav ul li ul li a:first-child(){ background: url(''); }
And this is my JS:
jQuery(document).ready(function($){ $( 'nav ul li a' ).hover( function(){ $(this).children('ul.sub-menu').slideDown(200); }, function(){ $(this).children('ul.sub-menu').slideUp(200); } ); });
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom js isn't working’ is closed to new replies.