I have a javascript code that is about 3000 lines long. All of the functions are in one file. I need to know if there is a way to include a function within the same file.
Example:
function renderGameLayout()
This would include all the layout designs.
Now later on in the code, I will be calling back to that function within another function? I tried:
function getGames()
{
// other js code here
$(document).ready(function()
{
renderGameLayout();
});
// other js code here
}
within another function, but this didn't work. Any suggestions? NOTE: I do not want to include another .js file, please do not suggest that.