Refer to this post for more information: Click here
I attempted to access a function that was defined in another .js file based on the instructions from the post. However, I encountered an issue. Take a look at my code below:
sildemenu.js
$(document).ready(function() {
var window.slideMenu=function(){
//perform actions here
}();
});
control.js
$(document).ready(function() {
$('#foo').on('click', function() {
window.slideMenu();
});
});
I received the error message "Object [object Window] has no method 'sildeMenu'." This is challenging for me as a beginner programmer. Any assistance would be greatly appreciated.