Problem
<script type="text/javascript" src="http://localhost/ci/js/global_functions.js"></script>
<script type="text/javascript" src="http://localhost/ci/js/global.js"></script>
Why can’t global.js find a function that I created in global_functions.js; right now I am only able to access that function use window.helper = { func: function() {} }
Code
$(document).ready(function() {
function id( input_id ) {
return document.getElementById( input_id ); //global_functions.js
}
}
$(document).ready(function() {
$(id( 'home_login' )).css( 'display', 'none' ); //global.js
}
The most likely reason is that you are defining the function in a non-global scope. It is hard to say for sure though as you haven’t shown us the code.
Update now that code has been added:
That is what is happening.