Title: Error with JavaScript in webshop
Last modified: August 12, 2020

---

# Error with JavaScript in webshop

 *  Resolved [mettekrabbe](https://wordpress.org/support/users/mettekrabbe/)
 * (@mettekrabbe)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-with-javascript-in-webshop/)
 * Hi,
    There is an error at our webshop, so people can´t put products in the basket:/
 * I´ve tried with Chrome and Safari – same error. SCRIPT_DEBUG did not fix it.
 * The error is:
    Uncaught TypeError: Cannot read property ‘mozilla’ of undefined
   at HTMLDocument.<anonymous> (wprmenu.js?ver=2017-03-16:97) at i (jquery.js?ver
   =1.12.4-wp:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2)
   at Function.ready (jquery.js?ver=1.12.4-wp:2) at HTMLDocument.J (jquery.js?ver
   =1.12.4-wp:2)
 * Any idea how to fix it?
 * Best regards,
    Mette
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-with-javascript-in-webshop%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [mettekrabbe](https://wordpress.org/support/users/mettekrabbe/)
 * (@mettekrabbe)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-with-javascript-in-webshop/#post-13244084)
 * Update:
    I downgraded to WordPress 5.4 and now it works again.
 * Best regards,
    Mette
 *  [secondsilver](https://wordpress.org/support/users/secondsilver/)
 * (@secondsilver)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-with-javascript-in-webshop/#post-13253207)
 * Is this affecting all Icraft shops? I have not had any orders today and I did
   upgrade my both my Icraft version and the wordpress version…just wondering!
 *  [mattbrown68](https://wordpress.org/support/users/mattbrown68/)
 * (@mattbrown68)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/error-with-javascript-in-webshop/#post-13254017)
 * In case it helps, I had the same problem with i-amaze and had to edit the javascript
   for the theme. The file wprmenu.js (inc/responsive-menu/js/wprmenu.js in my case)
   has a commented out section like so:
 *     ```
       //Additional fixes on change device orientation
       /*
       if( $.browser.mozilla ) {
       	screen.addEventListener("orientationchange", function() {updateOrientation()}); //firefox
       } else if( window.addEventListener ) {
       	window.addEventListener('orientationchange', updateOrientation, false);
       }
       else {
       	window.attachEvent( "orientationchange" );
       }*/
       ```
   
 * On the phone through the debugger, Chrome was not treating that as a comment.
   I changed it to the following:
 *     ```
       //Additional fixes on change device orientation
       /*
       if( if (typeof($.browser) != 'undefined') && $.browser.mozilla ) {
       	screen.addEventListener("orientationchange", function() {updateOrientation()}); //firefox
       } else if( window.addEventListener ) {
       	window.addEventListener('orientationchange', updateOrientation, false);
       }
       else {
       	window.attachEvent( "orientationchange" );
       }*/
       ```
   
 * Which should not produce an error if not treated as a comment, but once the change
   was made, Chrome began treating it as a comment. Go figure… You could also simply
   delete the section, I suspect.
 * Good luck!
 *  Theme Author [marsian](https://wordpress.org/support/users/marsian/)
 * (@marsian)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/error-with-javascript-in-webshop/#post-13265330)
 * 1. Upgrade the theme and all plugins.
    2. Upgrade WordPress 3. Clean your browser
   cache so that your browser do not load old files from cache
 * You should be fine, If you face any issue open a new support thread, we will 
   try to help fix the issues.

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

The topic ‘Error with JavaScript in webshop’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/i-craft/3.5.5/screenshot.png)
 * i-craft
 * [Support Threads](https://wordpress.org/support/theme/i-craft/)
 * [Active Topics](https://wordpress.org/support/theme/i-craft/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/i-craft/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/i-craft/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [WordPress 5.4](https://wordpress.org/support/topic-tag/wordpress-5-4/)
 * [WordPress 5.5](https://wordpress.org/support/topic-tag/wordpress-5-5/)

 * 4 replies
 * 4 participants
 * Last reply from: [marsian](https://wordpress.org/support/users/marsian/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/error-with-javascript-in-webshop/#post-13265330)
 * Status: resolved