• 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 to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Theme Author nobita

    (@nobita)

    Hi @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
    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

    Thank you.

    Thread Starter kev36663

    (@kev36663)

    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

    (@nobita)

    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

    (@kev36663)

    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

    (@nobita)

    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 5 years, 5 months ago by nobita.
    Thread Starter kev36663

    (@kev36663)

    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

    (@nobita)

    OK

    next update maybe change from “+ menu -” to humberger menu.

    Thank you.

    Thread Starter kev36663

    (@kev36663)

    that would solve my problem for sure πŸ™‚

    Theme Author nobita

    (@nobita)

    raindrops 1.526 is now live

    Please check humberger menu.

    Thank you

    Thread Starter kev36663

    (@kev36663)

    it’s a little worse

    it’s still got + and-

    but now isn’t marked as menu

    Theme Author nobita

    (@nobita)

    cache?
    please see below

    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

    (@kev36663)

    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

    (@kev36663)

    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.