WordPress.org

Support

Support » How-To and Troubleshooting » wp_enqueue_script and the jQuery plugins

wp_enqueue_script and the jQuery plugins

  • adding these lines to my header.php

    <?php wp_enqueue_script( 'jquery' ); ?>
    	<?php wp_enqueue_script( 'jquery-color' ); ?>

    will properly load jQuery, but fails with the jQuery-color plugin.

    Ees dees a bug?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Confirmed, absolutely nothing when attempting to do the same..

    I don’t use it, just wanted to confirm for you… 😉

    Tried other variants of the name to check for simple typos.

    jquery-Color
    Jquery-Color
    Jquery-color
    jquerycolor

    Thought it was worth a shot.. 🙂 No difference though..

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    Worked fine for me.

    All I used was wp_enqueue_script( 'jquery-color' ); and it loaded both jquery and jquery-color.

    Considering it’s loaded on every admin page, I think you’d rapidly notice if it was broken.

    Ok i tried your method..

    Result Source:

    <script type='text/javascript' src='http://localhost/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>

    No jQuery color…

    Seems to load the jQuery fine, but ignores the color one… i’m doing this in the theme’s header.php for what it’s worth.. is it reserved for admin only areas?

    Moderator Samuel Wood (Otto)

    @otto42

    WordPress.org Tech Dude

    I think that jquery-color is one of the footer scripts. It’s not loaded in the header by default. Look in the footer.

    Yes. It is snug in the footer!

    S.K

    Won’t work for me. I’m talking about using it in the theme, as in front-end. Not the admin.
    I am now loading them manually …

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp_enqueue_script and the jQuery plugins’ is closed to new replies.