Here\'s the scenario: I have a menubar.js script, which, when the page loads, queries the server for user\'s permissions, and then creates a menubar based on them. code snippet:
you forgot var before currentPage
var
currentPage
$(function() { //set this page as the current page; var currentPage = Enum.Page.Reports; });
make sure that your function SetCurrentPage is being called after dom.ready event