Why is the Javascript not loading on this WordPress plugin?
<p>I have looked over carefully at the scripts file for a WordPress plugin I am developing and I also looked at a similar post:</p>

<p><a href="https://stackoverflow.com/questions/17505563/javascript-file-not-working-when-linked-from-html">javascript file not working when linked from HTML</a></p>

<p>but the answer above has not worked either. I am not sure why the javascript file is not loading.</p>

<p>Here is the includes/newsletter-subscriber-scripts.php:</p>

<pre><code>&lt;?php

// Add Scripts
function ns_add_scripts(){
        wp_enqueue_style('ns-main-style', plugins_url().'/newsletter-subscriber/css/style.css');
        wp_enqueue_script('ns-main-script', plugins_url().'/newsletter-subscriber/js/main.js');
}

add_action('wp_enqueue_scripts', 'ns_add_scripts');
</code></pre>

<p>Here is the javascript file that is not loading in /newsletter-subscriber/js/main.js:</p>

<pre><code>alert('Linked');
</code></pre>