title: jquery in wordpress not working
body: <p>i added jquery into my wordpress themes/themename/js file and tried to use it, but it doesn't work. It should make my header title red color, but it doesn't.  What am i doing wrong? </p>
  
  <p>I also get the following error: Uncaught TypeError: (intermediate value)(...) is not a function</p>
  
  <p><strong>FUNCTIONS.PHP</strong></p>
  
  <pre><code>function twentyfourteen_child_scripts() {
      wp_enqueue_script( 'extra js', get_stylesheet_directory_uri() . '/js/extra.js');
  }
  
  add_action( 'wp_enqueue_scripts', 'twentyfourteen_child_scripts' );
  
  
   wp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery-3.2.0.min.js');
  </code></pre>
  
  <p><strong>EXTRA.JS</strong></p>
  
  <pre><code>window.onload = function() {
      if (window.jQuery) {  
          // jQuery is loaded  
          alert("Yeah!");
      } else {
          // jQuery is not loaded
          alert("Doesn't Work");
      }
  }
  
  
  jQuery(document).ready(function( $ ) {
  
     jQuery('.head-title').css('color','red');
  
  });
  </code></pre>
  
  <p><strong>INDEX.PHP</strong></p>
  
  <pre><code>&lt;?php
  
  get_header();
  
  ?&gt;
  
  &lt;div class="container"&gt;
  
  &lt;div class="secondary-column"&gt;
      &lt;?php dynamic_sidebar('sidebar1');// sinu widgets sidebar ?&gt; 
  &lt;/div&gt;
  
  &lt;div class="post-content"&gt;
  
  &lt;?php
  
  if (have_posts()) :
      while (have_posts()) : the_post();
  
      get_template_part('content', get_post_format());  // dynamically include the post format - get_post_format() - lubab sul sinu enda nullist üles ehitatud posti lisada. Näide: content-aside.php  
  
      endwhile;
  
      else :
          echo '&lt;p&gt;No content found&lt;/p&gt;';
  
      endif;
  
  ?&gt;
  
      &lt;div class="pagination"&gt;
          &lt;?php
              echo paginate_links();
          ?&gt;
      &lt;/div&gt;
  
  &lt;?php
  
  get_footer();
  
  ?&gt;
  </code></pre>
  
  <p><strong>HEADER.PHP</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html &lt;?php language_attributes(); ?&gt;&gt;
      &lt;head&gt;
          &lt;meta charset="&lt;?php bloginfo('charset'); ?&gt;"&gt;
          &lt;meta name="viewport" content="width=device-width"&gt;
          &lt;title&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;
          &lt;?php wp_head(); ?&gt;
  
  
  
      &lt;/head&gt;
  
  &lt;body &lt;?php body_class(); ?&gt;
  
  
          &lt;!-- site-header --&gt;
          &lt;header class="site-header"&gt;
  
              &lt;div class="header-container"&gt;
                  &lt;nav class="site-nav"&gt;
  
                      &lt;h1 class ="head-title"&gt;My website&lt;/h1&gt;
  
                          &lt;!-- hd-search --&gt;
                      &lt;div class="hd-search"&gt;
                          &lt;?php get_search_form(); ?&gt;
                      &lt;/div&gt;&lt;!-- /hd-search --&gt;
  
                      &lt;?php
  
                      $args = array(
                          'theme_location' =&gt; 'primary'
                      );
  
                      ?&gt;
  
                      &lt;?php wp_nav_menu(  $args ); ?&gt; 
  
                      &lt;?php
  
  
  
                      $args2 = array(
                          'child_of' =&gt; get_top_ancestor_id(),
                          'title_li' =&gt; ''
                      );
  
                      ?&gt;
  
                      &lt;div class="children-links"&gt;
  
                          &lt;?php wp_list_pages($args2); ?&gt;
  
                      &lt;/div&gt;
  
  
                  &lt;/nav&gt;
  
  
              &lt;/div&gt;
  
          &lt;/header&gt;&lt;!-- /site-header --&gt;
  </code></pre>