问题
<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>
为什么 global.js 找不到我在 global_functions.js 中创建的函数;现在我只能访问该功能使用window.helper = { func: function() {} }
代码
$(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
}