The situation is simple: I'm using the Bones framework for Wordpress. If I put the jQuery in the scripts.js file, they run fine. Everything works. If try loading the the jQuery calls ONLY if a yep or nope is satisfied, nothing happens. What am I doing wrong?
script.js
// Modernizr.load loading the right scripts only if you need them
Modernizr.load([
{
// Let's check something simple
test : Modernizr.borderradius,
// this should then satisfy the yep and load this script
yep : ['libs/jq-desk-calls.js']
}
]);
jQuery(document).ready(function($) {
// if I put the code from jq-desk-calls.js here, it works fine
}
I'm using a simple test to make sure it should fire the yep. But nothing happens. The file it's calling is just the code that I can use in the document.ready call and works fine. Does it have to do with calling document.ready from an outside file?
jq-desk-calls.js
$(document).ready(function() {
//LOGO ROLL
$('li#menu-item-477').append('<div class="emblemhover"></div>');
}