Title: Local Host JavaScript now working
Last modified: September 1, 2016

---

# Local Host JavaScript now working

 *  [shru94](https://wordpress.org/support/users/shru94/)
 * (@shru94)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/local-host-javascript-now-working/)
 * I have included the following codes,
 * <?php wp_enqueue_script(“jquery”); ?>
    <?php wp_head(); ?>
 * in header.php
 * ————————————
 * <?php wp_footer(); ?>
    in footer.php and ————————————
 * <?php
 * function wpbootstrap_scripts()
    { wp_enqueue_script( ‘application’, get_template_directory_uri().‘/
   js/application.js’ ); wp_enqueue_script( ‘bootstrap-collapse’, get_template_directory_uri().‘/
   js/bootstrap-collapse.js’ ); wp_enqueue_script( ‘bootstrap-tab’, get_template_directory_uri().‘/
   js/bootstrap-tab.js’ ); wp_enqueue_script( ‘bootstrap-transition’, get_template_directory_uri().‘/
   js/bootstrap-transition.js’ ); wp_enqueue_script( ‘bootstrap.min’, get_template_directory_uri().‘/
   js/bootstrap.min.js’ ); wp_enqueue_script( ‘owl.carousel’, get_template_directory_uri().‘/
   js/owl.carousel.js’ ); wp_enqueue_script( ‘script’, get_template_directory_uri().‘/
   js/script.js’ ); } add_action( ‘wp_enqueue_scripts’, ‘wpbootstrap_scripts’ );
 * ?>
    —————————————————– the javascript files are located in a folder called js
   which is located where header.php is. I don’t understand why this is not working.
 * Any help will be much appreciated, thank you

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [9 years, 11 months ago](https://wordpress.org/support/topic/local-host-javascript-now-working/#post-7518830)
 * What shows up in your browser’s console log?
 *  Thread Starter [shru94](https://wordpress.org/support/users/shru94/)
 * (@shru94)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/local-host-javascript-now-working/#post-7518978)
 * it says
    ” $ is not defined ”
 *  [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/local-host-javascript-now-working/#post-7519075)
 * Hi shru94,
 * In which file have you write this function?
    **function wpbootstrap_scripts()**
 * and which theme are you using?
 * I have used your defined code in my localhost and it is working absolutely fine.
   Please check your theme and function again maybe you are missing something to
   add here.
 * Thanks,
    Sami

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Local Host JavaScript now working’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [newtheme](https://wordpress.org/support/topic-tag/newtheme/)

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 3 replies
 * 3 participants
 * Last reply from: [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/local-host-javascript-now-working/#post-7519075)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
