Hi,
I’m currently trying to add FitVids.js via Bower and I’m not having any luck. I managed to get it working on another theme that I’m developing with ease but this time it doesn’t appear to be working.
I added FitVids via Terminal:
bower install --save fitvids
and it has been saved to my bower_components, I then ran gulp and everything appears to be in my main.js file with no errors.
I then added then added the init code to the init
section of the main.js
file:
var Sage = {
// All pages
'common': {
init: function() {
$(document).ready(function(){
// Target your .container, .wrapper, .post, etc.
$("body").fitVids();
});
// JavaScript to be fired on all pages
},
finalize: function() {
// JavaScript to be fired on all pages, after page specific JS is fired
}
},
// Home page
'home': {
init: function() {
// JavaScript to be fired on the home page
},
finalize: function() {
// JavaScript to be fired on the home page, after the init JS
}
},
// About us page, note the change from about-us to about_us.
'about_us': {
init: function() {
// JavaScript to be fired on the about us page
}
}
};
I’m sure that I’m just missing something stupid, any help would be greatly appreciated.
Thanks in advance!