Jump to content
GreenSock

LazyRectangle

Tweening Nav height

Go to solution Solved by PointC,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I am tweening my navbar in by height, is this a good idea?

 

I am asking that because I am worried if javascript were to fail for the user the navbar would never show.

Link to comment
Share on other sites

  • Solution

Hi LazyRectangle  :)

 

Welcome to the GreenSock forums. 

 

It's always good practice to have a fallback for those scenarios. You can set up a check if the user has JavaScript disabled and if they do you can set the height of the nav bar via your CSS. Modernizr makes that pretty easy for you.

 

https://modernizr.com/

 

You can also use a <noscript> tag to display a message for those users as well. 

 

Hopefully that helps a bit.

 

Happy tweening and thanks for being a Club GreenSock member.

:)

Link to comment
Share on other sites

Thanks for that reply PointC, that is the answer i needed. I am pretty new to web stuff so i'm still finding my feet.

 

GSAP is great and it's good to know they have a good forum.

 

:)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×