Title: Broken scripts
Last modified: June 16, 2019

---

# Broken scripts

 *  Resolved [Ivan](https://wordpress.org/support/users/gensay/)
 * (@gensay)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/)
 * By deleting audio vidget from footer, i broke my scripts and other vidgets. How
   can i solve this problem?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fbroken-scripts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/#post-11642762)
 * hmm, looks like you’re asyncing jQuery, can you try not doing that and see if
   that helps?
 *  Thread Starter [Ivan](https://wordpress.org/support/users/gensay/)
 * (@gensay)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/#post-11642793)
 * still not working, without any async. disabling plugin do the same.
    when i customize
   theme – works fine, in normal view – broken.
    -  This reply was modified 6 years, 11 months ago by [Ivan](https://wordpress.org/support/users/gensay/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/#post-11642860)
 * I indeed do not see an error on the browser console any more, so that’s a start.
   so what is not working specifically? and (assuming the problem is with scripts)
   when JS optimization is active, what JS errors do you see on the console?
 *  Thread Starter [Ivan](https://wordpress.org/support/users/gensay/)
 * (@gensay)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/#post-11685850)
 * Error
 *     ```
       TypeError: $ is not a functionl2note.com:789:3
           https://l2note.com/:789
           jQuery 4
               i
               fireWith
               ready
               J
       ```
   
 * Script
 *     ```
       /*789*/ $('.kplus').on('click', function() {
          var theClass = $(this).attr('id');
   
          if ($('.text'+theClass).css('display') == 'none') {
           $('.text'+theClass).animate({height: 'show'}, 100);
           $('#'+theClass+'.kplus').addClass('viz');
          } else {
       ```
   
 *  Thread Starter [Ivan](https://wordpress.org/support/users/gensay/)
 * (@gensay)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/#post-11686177)
 * ok, figured it out
 * [here, if someone need =)](https://stackoverflow.com/questions/12258282/typeerror-is-not-a-function-wordpress)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/#post-11686596)
 * good job Ivan 🙂

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

The topic ‘Broken scripts’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/broken-scripts/#post-11686596)
 * Status: resolved