Title: JavaScript Not Working Properly
Last modified: August 24, 2016

---

# JavaScript Not Working Properly

 *  [eternal_m](https://wordpress.org/support/users/eternal_m/)
 * (@eternal_m)
 * [11 years ago](https://wordpress.org/support/topic/javascript-not-working-properly/)
 * Hello, I’m having issues with JavaScript working on my website. On my static 
   website, when you click “Design” or “Illustration”, the objects move around, 
   but on the WordPress site, the objects don’t. I’ve been trying everything, from
   forcing jQuery to an older version, to checking the order JavaScripts are being
   applied.
 * I’m at a total loss. :\
 * Here’s the static site of how it is supposed to work:
    [http://rrzart.com/static/portfolio.html](http://rrzart.com/static/portfolio.html)
 * here is my WordPress site thus far:
 * [http://rrzart.com/portfolio/](http://rrzart.com/portfolio/)
 * Here is my functions.php so far:
 *     ```
       <?php
   
       function wpt_theme_styles() {
   
       	wp_enqueue_style( 'normalize', get_template_directory_uri() . '/css/normalize.css' );
       	wp_enqueue_style( 'grid', get_template_directory_uri() . '/css/grid.css' );
       	wp_enqueue_style( 'headerstyle', get_template_directory_uri() . '/css/headerstyle.css' );
       	wp_enqueue_style( 'headerstyleie', get_template_directory_uri() . '/css/headerstyleie.css' );
       	wp_enqueue_style( 'main', get_template_directory_uri() . '/style.css' );
       }
   
       add_action( 'wp_enqueue_scripts', 'wpt_theme_styles' );
   
       //Making jQuery Google API
   
       function modify_jquery() {
   
           if (!is_admin()) {
   
               // comment out the next two lines to load the local copy of jQuery
   
               wp_deregister_script('jquery');
   
               wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js', false, '1.8.1');
   
               wp_enqueue_script('jquery');
   
           }
   
       }
   
       add_action('init', 'modify_jquery');
   
       function wpt_theme_js() {
   
         wp_register_script( 'responsive-nav', get_template_directory_uri() . '/js/responsive-nav.js', false );
         wp_register_script( 'jquery-isotopemin', get_template_directory_uri() . '/js/jquery.isotope.min.js', array('jquery'), false );
       wp_register_script( 'fastclick', get_template_directory_uri() . '/js/fastclick.js', '1.0', true );
         wp_register_script( 'scroll', get_template_directory_uri() . '/js/scroll.js', '1.0', true );
         wp_register_script( 'fixed-responsivenav', get_template_directory_uri() . '/js/fixed-responsive-nav.js', '1.0', true );
         wp_register_script( 'app', get_template_directory_uri() . '/js/app.js', '1.0', true );
   
       	wp_enqueue_script( 'responsive-nav', get_template_directory_uri() . '/js/responsive-nav.js', '', '', false );
       	wp_enqueue_script( 'jquery-isotopemin', get_template_directory_uri() . '/js/jquery.isotope.min.js', array(jquery), '', false );
       	wp_enqueue_script( 'fastclick', get_template_directory_uri() . '/js/fastclick.js', '', '', true );
       	wp_enqueue_script( 'scroll', get_template_directory_uri() . '/js/scroll.js', '', '', true );
   
       	wp_enqueue_script( 'fixed-responsivenav', get_template_directory_uri() . '/js/fixed-responsive-nav.js', '', '', true );
       	wp_enqueue_script( 'app', get_template_directory_uri() . '/js/app.js', '', '', true );
       }
   
       add_action ( 'wp_enqueue_scripts', 'wpt_theme_js' );
   
       ?>
       ```
   
 * Thanks for any help!

Viewing 1 replies (of 1 total)

 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [11 years ago](https://wordpress.org/support/topic/javascript-not-working-properly/#post-6035774)
 * > from forcing jQuery to an older version
 * You generally want to avoid doing that. It would be like going back to using 
   WordPress 3.0 and not 4.1.
 * Looking at the console:
 *     ```
       Uncaught TypeError: Cannot read property 'offsetTop' of null fixed-responsive-nav.js:64
       ```
   
 * Have you tried deactivating your plugins to see if it could be a potential conflict?

Viewing 1 replies (of 1 total)

The topic ‘JavaScript Not Working Properly’ is closed to new replies.

## Tags

 * [header.php](https://wordpress.org/support/topic-tag/header-php/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [templates](https://wordpress.org/support/topic-tag/templates/)
 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/javascript-not-working-properly/#post-6035774)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
