In my meteor 1.3 and React apps, when I try to use a jquery plugin, it won’t work. On the console, I always see an error saying the function is not defined. For example,
Uncaught TypeError: $(...).countdown is not a function. Earlier I added the js files in the header like this in a index.html file (Placed in the app’s root):
<head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.1.0/jquery.countdown.min.js"></script> </head>
But since Meteor 1.3 moved all js to the footer, now I load them inside the body tag in the same index file. Now the files are loaded and the jquery plugins can find jQuery without issues. But have trouble using them in the react components. I wrap my functions inside
$(document).ready. But it’s not working. Any idea why?