Hi all,
I want to know how Meteor load my js file? Cause I still don’t know how to make it work.
I have a simple html template (which I download from web, including some css, javascript) and want to convert it into Blaze template. Here what I done:
- I put js/, images/ and font/ folders in public/ and css/ html in client/.
- Fix html file to correct blaze template.
I run OK. but some cool function of the template disappear. From browser console, I got these:
Uncaught TypeError: $(…).wmuSlider is not a function
Uncaught TypeError: $(…).UItoTop is not a function
I tried many ways but can’t make it work.
Some weird things in HTML file make me confused:
<script>
$('.example1').wmuSlider();
</script>
<script src="js/jquery.wmuSlider.js"></script>
This caused issue.
But this:
<script type="text/javascript">
$(window).load(function() {
$("#flexiselDemo3").flexisel({
visibleItems: 3,
animationSpeed: 1000,
autoPlay: true,
autoPlaySpeed: 3000,
pauseOnHover: true,
enableResponsiveBreakpoints: true,
responsiveBreakpoints: {
portrait: {
changePoint: 480,
visibleItems: 2
},
landscape: {
changePoint: 640,
visibleItems: 2
},
tablet: {
changePoint: 768,
visibleItems: 3
}
}
});
});
</script>
<script type="text/javascript" src="js/jquery.flexisel.js"></script>
Work perfect, image is sliding.
Could someone help me understand why?
Thanks.