I'm trying to build simple javascript-based navigation that will display different content each time user clicks one the of links in the navbar.
The content stored in separate HTML files that containing only specific article wrapped in "description" div:
Each link on the navbar has the url to proper content file.
I'm using following jquery code to place content in response of user clicks:
The code working fine, but (to improve user experience) i want to make an fadeIn -fadeOut animation: I want the content fade out and after, the other content fade in.
Its looks like this code will do the work:
Looks like, but not.
The new content appears in the content panel even before the fading out starts.
The 'load' function didnt wait to 'fadeOut' to finish.
Here is some solution to fix this:
Now the 'load' is inside the 'fadeOut' - that means it will happen in the end
of fade out animation
[Download code]
Subscribe to:
Post Comments (Atom)
Getting started with docker
It is very simple to get started usig docker. All you need to do-is download the docker desktop for your system Once you get docker syste...
-
This button must show the list of users who answered the survey. Which survey? The one with its checkbox checked, of course : This code i...
-
When you about to do your first PR (pull request) it is important to know how to squash commits correctly. Why? you may ask - Well i know...
-
Directive in contemporary angular - means piece of code which doing something on the html block is attached to as attribute. For example l...
No comments:
Post a Comment