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

TypeError: titanic.play is not a function #11

Closed
Exlord opened this issue Feb 19, 2019 · 1 comment
Closed

TypeError: titanic.play is not a function #11

Exlord opened this issue Feb 19, 2019 · 1 comment

Comments

@Exlord
Copy link

Exlord commented Feb 19, 2019

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.rawgit.com/icons8/titanic/master/dist/js/titanic.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/4.5.9/bodymovin.min.js"></script>
  </head>
  <body>

    <div class='titanic titanic-unlock'></div>
    <script>
      console.log(Titanic);
      var titanic = new Titanic('https://rawgit.com/icons8/titanic/master/src/icons/');
      console.log(JSON.stringify(titanic));
      console.log(titanic.toSource());
      console.log(titanic.play('unlock'));
    </script>
  </body>
</html>
function Titanic()          

{"options":{"baseURL":"https://cdn.rawgit.com/icons8/titanic/master/dist/icons/","hover":true,"click":false}}         

({options:{baseURL:"https://cdn.rawgit.com/icons8/titanic/master/dist/icons/", hover:true, click:false}}) 

TypeError: titanic.play is not a function

@Exlord
Copy link
Author

Exlord commented Feb 19, 2019

My bad , it seems object is being generated after DOMContentLoaded event

@Exlord Exlord closed this as completed Feb 19, 2019
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

1 participant