How do you pass items to the jQuery function "ready()" in Joomla?
$(document).ready(function(){
// some code...
});
I'm already using this function and most items in it will be static (won't change based on modules, etc.). However, in some cases, I need to "inject" additional code into this function.
In particular, I have a custom JS function that sets an element's background image and it's called in this function, like this:
// Set background of element with ID and image path.
setBackgroundImage("img-2","global/img/rotator/ourstate.jpg");
This will be in a module. How do I pass that into the jQuery ready() function in Joomla? Thanks.