Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent all phrases from flashing inside rotating element on page load #36

Open
mehtaculous opened this issue Feb 11, 2018 · 4 comments

Comments

@mehtaculous
Copy link

Is there anyway to prevent all the phrases from flashing when the page is reloaded? Everything inside the element will appear at once for a quick second before the animation triggers.

index.html

<h4><span id="js-rotating">Software Engineer | Developer | Programmer</span></h4><br>

main.js

 $("#js-rotating").Morphext({
    animation: "flipInX",
    separator: "|",
    speed: 3000
 });
@MrSaints
Copy link
Owner

You can set the display: none for #js-rotating, and set it to display: inline-block for .morphext since that is only applied once the script is started.

@mehtaculous
Copy link
Author

How exactly do I add the display: inline-block to .morphtext inside the .js file?

@MrSaints
Copy link
Owner

It'd be better to do it using CSS. e.g. https://github.com/MrSaints/Morphext/blob/master/dist/morphext.css

@mehtaculous
Copy link
Author

cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants