I'm looking to get the Calendar javascript functionality to work in my Ruby on Rails app, and it's not, and I'm wondering what I'm doing wrong?
I've bundle installed both the fomantic-ui-sass
and the 'jquery-rails'gems in my application, and put into the app/assets/application.js
the following:
// Loads all Semantic javascripts
//= require semantic-ui
// Load jquery
// = require jquery
// = require jquery_ujs
I then put the JS code I found on Fomantic UI into the application.js file, e.g.
$('#standard_calendar')
.calendar()
;
There are two things wrong with the above code. Notice that there's a space // =
instead of //=
.
Second, if the semantic-ui is dependent on jquery, jquery should be loaded first.