Currently, I have my all.js file with this:
//= require jquery
//= require jquery.nicescroll.min
//= require bootstrap.min
$(document).ready(function() {
$('.carousel').carousel();
$('html').niceScroll();
});
I would like to move it into an all.js.coffee, complying with the instrucions here. How do I go about doing that because the //=
results in a compile error.
//= require jquery
//= require jquery.nicescroll.min
//= require bootstrap.min
$(document).ready ->
$('.carousel').carousel()
$('html').niceScroll()
From the fine manual:
Supported Comment Types
The directive processor understands comment blocks in three formats:
[...]# Single-line comment blocks (CoffeeScript) #= require foo
so presumably you'd say:
#= require jquery
#= require jquery.nicescroll.min
#= require bootstrap.min
$(document).ready ->
$('.carousel').carousel()
$('html').niceScroll()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With