• Hello,

    I’am a new theme developer and I got my theme rejected because i use deregister WordPress default jQuery. Actually my theme need to work with jquery.min v1.5.2 but how to use it without deregister default jQuery?

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • What specifically are you trying to do?

    Please include code examples and what various troubleshooting you went through to come to the conclusion that using 1.5.2 was necessary instead of the current version.

    Thread Starter mascatu

    (@mascatu)

    This is the code that I use now and works great:

    add_action('wp_enqueue_scripts', 'tigu_frontend_scripts');
    function tigu_frontend_scripts() {
        wp_register_script('jquerymin', 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js', 'jquery');
        wp_register_script('likescript', get_template_directory_uri().'/js/likescript.js', 'jquery');
        wp_register_script('easing', get_template_directory_uri().'/js/jquery.easing.min.js', 'jquery');
        wp_register_script('lavalamp', get_template_directory_uri().'/js/jquery.lavalamp.min.js', 'jquery');
        wp_register_script('jCarouselLite', get_template_directory_uri().'/js/jcarousellite_1.0.1.pack.js', 'jquery');
        wp_register_script('ticker', get_template_directory_uri().'/js/jquery.ticker.js', 'jquery');
        wp_register_script('tiptip', get_template_directory_uri().'/js/jquery.tipTip.minified.js', 'jquery');
        wp_register_script('liscroller', get_template_directory_uri().'/js/jquery.li-scroller.1.0.js', 'jquery');
        wp_register_script('scrollTop', get_template_directory_uri().'/js/scrolltopcontrol.js', 'jquery');
        wp_register_script('superfish', get_template_directory_uri().'/js/superfish.js', 'jquery');
        wp_register_script('supersubs', get_template_directory_uri().'/js/supersubs.js', 'jquery');
        wp_register_script('nivo-slider', get_template_directory_uri().'/js/jquery.nivo.slider.pack.js', 'jquery');
        wp_register_script('GrameleonTheme', get_template_directory_uri().'/js/scripts.js', 'jquery');
        wp_enqueue_script('jquery');
        wp_enqueue_script('jquerymin');
        wp_enqueue_script('likescript');
        wp_enqueue_script('easing');
        wp_enqueue_script('lavalamp');
        wp_enqueue_script('jCarouselLite');
        wp_enqueue_script('ticker');
        wp_enqueue_script('tiptip');
        wp_enqueue_script('liscroller');
        wp_enqueue_script('scrollTop');
        wp_enqueue_script('superfish');
        wp_enqueue_script('supersubs');
        wp_enqueue_script("comment-reply");
        wp_enqueue_script('nivo-slider');
        wp_enqueue_script('GrameleonTheme');
        wp_localize_script('GarmeleonTheme', 'GrameleonVars',
        array(
             'templateurl' => get_template_directory_uri(),
             'ajaxUrl' => admin_url('admin-ajax.php')
            )
        );
    }

    So, if I remove the
    wp_register_script('jquerymin', 'https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js', 'jquery');
    assuming that the theme will work with the default WordPress jQuery, my theme break and all features(including my own scripts.js) which depends on jQuery, freezing and does not want to work.

    Thank you and I`am sorry for may first skin-deep post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Default jQuery and jQuery.min’ is closed to new replies.