javascript - Why does my nav not resize after removing class in JQuery? -
i have been working on website since last week. school project, , can't figure out why part of isn't working. when scroll down, click on menu button, leave menu down, scroll up, navbar keeps height though take away class resized it. have attempted use google chrome's developer tools see happening. shows height property crossed out. have no idea why won't work, , have looked reason in code. tried in internet explorer see if chrome having problems reason. did same thing there causing me assume problem in code.
here link website published on: http://www.dragonmath.net/rockets/
html code: http://www.dragonmath.net/rockets/index.html
javascript code: http://www.dragonmath.net/rockets/javascript/main.js
css sheet 1: http://www.dragonmath.net/rockets/styles/main.css
css sheet 2: http://www.dragonmath.net/rockets/styles/function.css
got problem!! after scrolling top didn't change height of nav
element;after scroll make 40px again may solve problem.
if (flag !== 2 && $(window).scrolltop() === 0) { //add line $nav.css({height:'40px'}); $nav.slideup(); $nav.removeclass("dropdown"); $menu.stop(true,false).slideup(800, function () { $heading.css({'margin-left':'40px'}) }); $nav.stop(true,false).slidedown(); flag = 2; }
Comments
Post a Comment