title: jQuery + PHP + JavaScript + Wordpress: HTML Button call on click
body: <p>Ok, so I've read countless attempted answers on similar problems, but for whatever reason they're not working for me.  I have a WordPress site and I'm attempting to make a plugin that needs jQuery.  </p>
  
  <p>First, there's my wp-content/plugins/my-plugin/index.php page:</p>
  
  <pre><code>    &lt;?php
      add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' ); 
  
      function wpb_adding_scripts() {
      wp_enqueue_script('TestFile', plugins_url('/js/TestFile.js', __FILE__), array('jquery'),'1.1', false);
      }
      ...
  function printButton(){
  echo '&lt;input type ="button" id="myButton" name="myButton" value="My Button"/&gt;';
  }
  </code></pre>
  
  <p>I call printButton about a dozen times in the code, and I've checked the HTML to ensure that it spits out as written.  If a user clicks any of the dozen buttons, I want the same jQuery call to run.  I've also made sure that jquery itself is enqueued in the header file for WordPress, so it definitely knows that jQuery exists.  When I do an Inspect Element view, the console spits out no errors when I click.</p>
  
  <p>Then there's my TestFile.js file:</p>
  
  <pre><code>jQuery(function() {
      jQuery('#myButton').click(function(e){
      alert("Button Clicked!");
      });
    });
  </code></pre>
  
  <p>I know I should be able to use '$' instead of 'jQuery', but for whatever reason WordPress is being stupid.  So from everything I've read, this is pretty straightforward stuff and I should get a pretty little alert popup whenever I click any of my buttons.  Sadly, nothing happens when I click...  </p>
  
  <p>Ideas?  Many thanks for your assistance!</p>