Title: jquery problems / responsive menu
Last modified: October 29, 2018

---

# jquery problems / responsive menu

 *  [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/)
 * I’m having issues with my sites on the raindrop theme including rftkpromotions.
   co.uk and lockdownrockclub.co.uk
 * When going into the error console it says there are problems with jquery.
 * As a result of which, a responsive menu plugin which was working recently, now
   does not work – I don’t know if there has been a change made which now prevents
   this form working, but it is very frustrating as; well; I like the raindrops 
   theme but the mobile menu is ugly – so it makes sense to use the responsive menu–
   it’s very important for me that this works, any help is appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjquery-problems-responsive-menu%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10828494)
 * Hi [@kev36663](https://wordpress.org/support/users/kev36663/)
 * > Uncaught ReferenceError: jQuery is not defined
 * An error has occurred because the jquery dependency script is loaded before jquery
   is called
 * This is probably not a problem with the Raindrops theme
 * [http://www.rftkpromotions.co.uk/wp-content/cache/minify/5b521.js](http://www.rftkpromotions.co.uk/wp-content/cache/minify/5b521.js)
   
   and
 *     ```
       jQuery(function($) {
                   $('.date-pick').each(function() {
                       var format = $(this).data('format') || 'mm/dd/yyyy';
                       format = format.replace(/yyyy/i, 'yy');
                       $(this).datepicker({
                           autoFocusNextInput: true,
                           constrainInput: false,
                           changeMonth: true,
                           changeYear: true,
                           beforeShow: function(input, inst) { $('#ui-datepicker-div').addClass('show'); },
                           dateFormat: format.toLowerCase(),
                       });
                   });
                   d = new Date();
                   $('.birthdate-pick').each(function() {
                       var format = $(this).data('format') || 'mm/dd';
                       format = format.replace(/yyyy/i, 'yy');
                       $(this).datepicker({
                           autoFocusNextInput: true,
                           constrainInput: false,
                           changeMonth: true,
                           changeYear: false,
                           minDate: new Date(d.getFullYear(), 1-1, 1),
                           maxDate: new Date(d.getFullYear(), 12-1, 31),
                           beforeShow: function(input, inst) { $('#ui-datepicker-div').removeClass('show'); },
                           dateFormat: format.toLowerCase(),
                       });
   
                   });
   
               });
       ```
   
 * These two scripts are called before jQuery is invoked.
 * Analogous to the position of the code, it may be inserted using the_generator
   filter.
 * You can place code that depends on jquery in the appropriate place by referring
   to the following page.
    [wp_enqueue_script() | Function | WordPress Developer Resources](https://developer.wordpress.org/reference/functions/wp_enqueue_script/)
 * Thank you.
 *  Thread Starter [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10828990)
 * thank you for this. I should point out my knowledge in coding is limited – I 
   rely heavily on plugins and off-the-shelf settings.
 * The page seems easy enough to follow – but, for example, in which file(s?) do
   I place the code?
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10829037)
 * in which file(s?) do I place the code?
 * raindrops/functions.php
 * If you just installed the plug-in and did not write your own code, it is best
   to contact the plug-in author
 * Of course, do my best if there is any problem with the theme.
 * Thank you.
 *  Thread Starter [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10829095)
 * I’ve since tried other/similar plugins and run into the same problem.
 * There’s something in some update somewhere has knocked it out – but there’s not
   been new version(s) of the plugin released since I went from working fine to 
   not working fine.
 * I spoke to the plugin author who suggests it’s wordpress not calling jQuery –
   although things I was trying from there were not working.
 * It also affects 3 sites on 2 different hosts so not likely to be a hosting issue.
 * is it just a copy paste of the below I need to insert into my functions file?
 *     ```
       function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {
           $wp_scripts = wp_scripts();
   
           _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
   
   
           if ( $src || $in_footer ) {
               $_handle = explode( '?', $handle );
   
               if ( $src ) {
                   $wp_scripts->add( $_handle[0], $src, $deps, $ver );
               }
   
               if ( $in_footer ) {
                   $wp_scripts->add_data( $_handle[0], 'group', 1 );
               }
           }
   
           $wp_scripts->enqueue( $handle );
       }
       ```
   
 * and any particular location – I’m struggling to find where the offending functions
   above are called.
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10829291)
 * First, let’s see how plugins are inserting scripts into themes.
 * It is necessary to read the plug-in code and understand the mechanism.
 * Probably Plug-in do not use wp_enqueue_script (), so remove it,( stop errors )
 * It is necessary to use wp_enqueue_script () to adjust the script so that it is
   inserted in the correct position.
 * by the way
 * Is it possible to explain how the ugly mobile menu can be changed to become the
   pretty mobile menu?
    -  This reply was modified 7 years, 7 months ago by [nobita](https://wordpress.org/support/users/nobita/).
 *  Thread Starter [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10829539)
 * I’m not sure what you mean on the first points.
 * For a prettier menu.
 * Something like the hamburger (3 lines) which when clicks causes the menu to slide
   out – that’s a lot cleaner to use. Some other themese use this as default, otherwise
   it’s a case of looking for a plugin like Responsive Menu.
 * On a computer, the raindrops menu looks fab, but the “+ menu -” isn’t so great.
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10832862)
 * OK
 * next update maybe change from “+ menu -” to humberger menu.
 * Thank you.
 *  Thread Starter [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10832986)
 * that would solve my problem for sure 🙂
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10832998)
 * [raindrops 1.526 is now live](https://wordpress.org/themes/raindrops/)
 * Please check humberger menu.
 * Thank you
 *  Thread Starter [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10833066)
 * it’s a little worse
 * it’s still got + and-
 * but now isn’t marked as menu
 *  Theme Author [nobita](https://wordpress.org/support/users/nobita/)
 * (@nobita)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10833084)
 * cache?
    please see below
 * [https://www.tenman.info/wp3/previewraindrops/](https://www.tenman.info/wp3/previewraindrops/)
 * Note:update has mistake CSS
    PC view primary menu show scroll bar
 * Please add below style
 *     ```
       @media screen and (min-width : 641px){
           /* @1.527 */
           #doc3 #access,
           #doc5 #access {
               overflow-y:hidden;
           }
       }
       ```
   
 *  Thread Starter [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10833271)
 * yep – tried to clear cache and use other devices
 * I’ve had a look on your preview version – and the preview looks fine on web, 
   but doesn’t really work on mobile devices.
 *  Thread Starter [kev36663](https://wordpress.org/support/users/kev36663/)
 * (@kev36663)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10917927)
 * Hello,
 * Just a little update
 * Your new menu now works on one of my websites – lockdownrockclub.co.uk – and 
   it looks great – thank you!
 * however, on another – rftkpromotions.co.uk – it still looks messy… is there anything
   I need to do to correct this?

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

The topic ‘jquery problems / responsive menu’ is closed to new replies.

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

 * 13 replies
 * 2 participants
 * Last reply from: [kev36663](https://wordpress.org/support/users/kev36663/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/jquery-problems-responsive-menu/#post-10917927)
 * Status: not resolved