how to manipulate, on document.ready, elements which were created on document.ready

后端 未结 2 902
轮回少年
轮回少年 2021-01-26 02:25

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:

2条回答
  •  不知归路
    2021-01-26 02:43

    you forgot var before 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

提交回复
热议问题