I define the wp_enqueue_script in the pugin definition file and I can see my script being fired when I log in as admin, but not as a normal user. Why is this happening? And how can I enable scripts for all logged-in users, and not just admin? I did this on plugin file:
function enqueue_team_management_scripts() {
wp_enqueue_script("team-scripts", plugin_dir_url(__FILE__) . "js/team-scripts.js");
}
add_action("wp_enqueue_scripts", "enqueue_team_management_scripts");
and this on my template page:
<button id="create_team" onclick="createTeam();" >CREATE TEAM</button>
When I click the button, nothing happens (error displays in firebug)>