annyang icon indicating copy to clipboard operation
annyang copied to clipboard

Uncaught ReferenceError: annyang is not defined

Open einnar82 opened this issue 7 years ago • 2 comments

Good day,

I currently working in AnnyangJS. But when i link the cdn of annyang and used this syntax, `

// Add our commands to annyang annyang.addCommands(commands);

// Start listening. annyang.start(); }} `

It produces an error Uncaught ReferenceError: annyang is not defined,

But i was tried in your website demo, it works.

einnar82 avatar Oct 08 '17 03:10 einnar82

Hello @einnar82 , I guess you have copied the code example from the demo. Have a look at the "src" attribute of the annyang script. It is <script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script> You have to change it to <script src="https://cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>

I hope this will help you in your project!

dafo avatar Oct 13 '17 20:10 dafo

...or source the file locally ;-)

LukeMcLachlan avatar Jan 27 '18 17:01 LukeMcLachlan