Skip to content
New issue

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

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

Already on GitHub? # 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!

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

No branches or pull requests

2 participants