-
Notifications
You must be signed in to change notification settings - Fork 122
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
Installing FlipDown in a ReactJs Application #42
Comments
You can't yet <!-- index.html -->
<head>
<link rel="stylesheet" type="text/css" href="path/to/flipdown.css">
<script type="text/javascript" href="path/to/flipdown.js"></script>
</head> You'll then be able to access FlipDown globally with: new FlipDown(1538137672).start(); You can create the element to attach FlipDown to from within your React application as long as you do not call the above code before that element is available. Hope this helps. |
I've done as you explained however it still isn't working for me. I'm not getting any console errors however the counter is not showing up. index.html <head>
<link rel="stylesheet" href="./flipdown/flipdown.css" />
<script href="./flipdown/flipdown.js"></script>
<script type="text/javascript" href="./functions.js"></script>
</head>
<body>
<!-- a bunch of other irrelevant code here -->
<div id="flipdown" className="flipdown"></div>
</body> I included the JS to create a new function like this functions.jsdocument.addEventListener("DOMContentLoaded", () => {
new FlipDown(1656648119, {
theme: "dark",
})
.start()
.ifEnded();
}); What am I missing @PButcher? |
In your HTML, change |
Thanks, I'll give it a try. I gave up on it for that project but will try doing it in a codepen to see if that works. |
I already installed the library using npm, but I can't access the FlipDown component.
I don't want to change the source code, but at the same time, I don't have much experience incorporating JS libraries in React code.
I tried the code below but doesn't work.
Is it possible to import and use the methods to start the counter?
The text was updated successfully, but these errors were encountered: