I have the following code in document.ready()
if ($("#site-master").length > 0) {
setMinContentHeight();
function setMinContentHeight() {
// removed for clarity
}
}
I simply check if the page is correct (#site-master), then call my minimum height function, however I'm getting the following error in firebug: ReferenceError: setMinContentHeight is not defined.
I'm no javascript expert, but how can this be? The function works if I move it outside of document.ready(). I have checked and the code inside the if statement is reached.
Also, is this the best way of achieving what I want?
Thanks in advance.