I have to define different functions in my project and they all rely on jQuery, so I have to make sure that they are inside the document-ready function. When I place them there, I get the error described bellow. How can this be fixed? The jQuery lib seems to be included correctly.
In <head>
:
<script src="js/lib/jquery-2.0.3.min.js"></script>
Javascript:
$( document ).ready(function() {
function checkAvailability() {
...
}
});
When I try to access the function later on, I get this error:
Uncaught ReferenceError: checkAvailability is not defined