Coder Social home page Coder Social logo

Comments (3)

arielsalminen avatar arielsalminen commented on July 28, 2024 1

This happens because the plugin uses JavaScript on DOM ready to init the styles which are used to hide the nav. You can get around this by using either Modernizr, or by adding a bit of JS to "head". Like this:

var doc = document, docEl = doc.documentElement;
docEl.className = docEl.className.replace(/(^|\s)no-js(\s|$)/, " js ");

basically, (if you use the JS I just pasted) this means that you also have to add "no-js" class to html by default, which'll then get replaces by "js" if and when it is available.

There's also a third option: just remove the ".js" from the CSS :)

from responsive-nav.js.

geilt avatar geilt commented on July 28, 2024

You may have to hide / unhide certain elements by default if the js is
taking over on load. This can happen with any JS for layouts.

On Sat, Apr 13, 2013 at 3:37 PM, benjaminnathan [email protected]:

I'm experiencing a slight flash of the fully expanded nav when loading the
page. It hides very quickly, but it's still quite noticeable. Is there
anything I can do to the CSS to prevent this? Have I made an implementation
mistake?
I really appreciate the plugin, btw. Thank you tons.


Reply to this email directly or view it on GitHubhttps://github.com//issues/24
.

Alexander D. Conroy
(786) 315-9653 - Google Voice
(305) 767-1602 - Skype

from responsive-nav.js.

benjamindenboer avatar benjamindenboer commented on July 28, 2024

Thanks for the explanation and help! I have little JavaScript knowledge, so this is very helpful. I've removed the .js from the CSS, which seems to do the trick! :)

(BTW, what would you consider the best option? Are there any differences in either options?)

from responsive-nav.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.