Title: Two jQuery/javascript errors after update to 3.5
Last modified: August 20, 2016

---

# Two jQuery/javascript errors after update to 3.5

 *  Resolved [kanabi](https://wordpress.org/support/users/kanabi/)
 * (@kanabi)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/two-jqueryjavascript-errors-after-update-to-35/)
 * This morning I have updated my site – [http://www.marketingpolityczny.org](http://www.marketingpolityczny.org)–
   to v. 3.5. Instantly the browser console reported below errors with two javascripts
   based on jQuery. Thus the slider plugin on the mainpage stopped working as well
   as the top smooth scrolling script on every page. I tried to turn off the plugin
   and remove the script but no effect so far. Please help!
 * 1. Uncaught TypeError: Cannot read property ‘0’ of undefined jquery.animate-colors-
   min.js:7
 * Script code:
 *     ```
       /*
        Color animation jQuery-plugin
        http://www.bitstorm.org/jquery/color-animation/
        Copyright 2011 Edwin Martin <edwin@bitstorm.org>
        Released under the MIT and GPL licenses.
       */
       (function(d){function i(){var b=d("script:first"),a=b.css("color"),c=false;if(/^rgba/.test(a))c=true;else try{c=a!=b.css("color","rgba(0, 0, 0, 0.5)").css("color");b.css("color",a)}catch(e){}return c}function g(b,a,c){var e="rgb"+(d.support.rgba?"a":"")+"("+parseInt(b[0]+c*(a[0]-b[0]),10)+","+parseInt(b[1]+c*(a[1]-b[1]),10)+","+parseInt(b[2]+c*(a[2]-b[2]),10);if(d.support.rgba)e+=","+(b&&a?parseFloat(b[3]+c*(a[3]-b[3])):1);e+=")";return e}function f(b){var a,c;if(a=/#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(b))c=
       ```
   
 * Uncaught TypeError: Cannot read property ‘0’ of undefined
 *     ```
       [parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1];else if(a=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(b))c=[parseInt(a[1],16)*17,parseInt(a[2],16)*17,parseInt(a[3],16)*17,1];else if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))c=[parseInt(a[1]),parseInt(a[2]),parseInt(a[3]),1];else if(a=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(b))c=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10),parseFloat(a[4])];return c}
       d.extend(true,d,{support:{rgba:i()}});var h=["color","backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","outlineColor"];d.each(h,function(b,a){d.fx.step[a]=function(c){if(!c.init){c.a=f(d(c.elem).css(a));c.end=f(c.end);c.init=true}c.elem.style[a]=g(c.a,c.end,c.pos)}});d.fx.step.borderColor=function(b){if(!b.init)b.end=f(b.end);var a=h.slice(2,6);d.each(a,function(c,e){b.init||(b[e]={a:f(d(b.elem).css(e))});b.elem.style[e]=g(b[e].a,b.end,b.pos)});b.init=true}})(jQuery);
       ```
   
 * 2. Uncaught TypeError: Property ‘$’ of object [object Window] is not a function
   [http://www.marketingpolityczny.org:92](http://www.marketingpolityczny.org:92)
 * Script code:
 *     ```
       <!-- Top smooth scrolling -->
       <script type="text/javascript">
           $(document).ready(function(){
       ```
   
 * Uncaught TypeError: Property ‘$’ of object [object Window] is not a function
 *     ```
       $(window).scroll(function(){
                   if ($(this).scrollTop() > 100) {
                       $('.top').fadeIn();
                   } else {
                       $('.top').fadeOut();
                   }
               }); 
   
               $('.top').click(function(){
                   $("html, body").animate({ scrollTop: 0 }, 600);
                   return false;
               });
   
           });
       </script>
       ```
   

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/two-jqueryjavascript-errors-after-update-to-35/#post-3265958)
 * Try:
    – switching to the TwentyTwelve theme by renaming your current theme’s 
   folder inside wp-content/themes and adding “-old” to the end of the folder name
   using [FTP](http://codex.wordpress.org/FTP_Clients) or whatever file management
   application your host provides.
 * – [resetting the plugins folder](http://codex.wordpress.org/FAQ_Troubleshooting#How_to_deactivate_all_plugins_when_not_able_to_access_the_administrative_menus.3F)
   by FTP or phpMyAdmin.
 * – re-uploading all files & folders – **except** the wp-content folder – from 
   a **fresh** download of WordPress. Make sure that you delete the old copies of
   files & folder before uploading the new ones.
 * – running the upgrade manually via wp-admin/upgrade.php
 *  Thread Starter [kanabi](https://wordpress.org/support/users/kanabi/)
 * (@kanabi)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/two-jqueryjavascript-errors-after-update-to-35/#post-3265972)
 * Ok, thank you, I will. Meanwhile I managed to resolve the Skitter Slideshow plugin
   problem. One of the scripts in the plugin folder needed to be upgraded – jquery.
   animate-colors.min.js. The newest code is available here – [http://www.bitstorm.org/jquery/color-animation/](http://www.bitstorm.org/jquery/color-animation/).
 * Still working on the smooth scrolling problem though…
 *     ```
       <!-- Top smooth scrolling -->
       <script type="text/javascript">
           $(document).ready(function(){ 
   
               $(window).scroll(function(){
                   if ($(this).scrollTop() > 100) {
                       $('.top').fadeIn();
                   } else {
                       $('.top').fadeOut();
                   }
               }); 
   
               $('.top').click(function(){
                   $("html, body").animate({ scrollTop: 0 }, 600);
                   return false;
               });
   
           });
       </script>
       ```
   
 *  Thread Starter [kanabi](https://wordpress.org/support/users/kanabi/)
 * (@kanabi)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/two-jqueryjavascript-errors-after-update-to-35/#post-3265981)
 * Ok, already done! Everything’s up and running now:) Here’s the solution to my
   last problem:
 * [http://stackoverflow.com/questions/10807200/jquery-uncaught-typeerror-property-of-object-object-window-is-not-a-funct](http://stackoverflow.com/questions/10807200/jquery-uncaught-typeerror-property-of-object-object-window-is-not-a-funct)

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

The topic ‘Two jQuery/javascript errors after update to 3.5’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [kanabi](https://wordpress.org/support/users/kanabi/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/two-jqueryjavascript-errors-after-update-to-35/#post-3265981)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
