Title: Error Javascript when minimized
Last modified: February 2, 2023

---

# Error Javascript when minimized

 *  Resolved [pardebits](https://wordpress.org/support/users/pardebits/)
 * (@pardebits)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/error-javascript-when-minimized-2/)
 * hi! When I active the minimize JS I get this error in console:
   Uncaught TypeError:
   $.each is not a function
 * from this line:
 *     ```wp-block-code
       <script type='text/javascript' id='jquery-js-after'>jqueryParams.length&&$.each(jqueryParams,function(e,r){if("function"==typeof r){var n=String(r);n.replace("$","jQuery");var a=new Function("return "+n)();$(document).ready(a)}});</script>
       ```
   
 * I think this script is added by the module wp-optimized
 * any idea? thanks!

Viewing 1 replies (of 1 total)

 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/error-javascript-when-minimized-2/#post-16438856)
 * Under Minify>>Java script can you try checking the option to “Contain each included
   file in its own block _(enable if trying to isolate a JavaScript error introduced
   by minifying or merging)_“

Viewing 1 replies (of 1 total)

The topic ‘Error Javascript when minimized’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/error-javascript-when-minimized-2/#post-16438856)
 * Status: resolved