WordPress.org

Ready to get started?Download WordPress

Forums

Problem with wp_enqueue_script. jQuery not loading. (5 posts)

  1. prionkor
    Member
    Posted 3 years ago #

    Hi, i am using the function <?php wp_enqueue_script( 'jquery' ); ?> in head. But no jquery loading. Can anyone say what is the issue?

  2. prionkor
    Member
    Posted 3 years ago #

    Hi, i am trying searching the web and don't found anything why jquery isn't showing. I am currently using no jquery scripts just trying to import jquery by <?php wp_enqueue_script( 'jquery' ); ?>

    Waiting for answer. Thanks!

  3. Wait longer. Double posting like that doesn't help.

    Since WordPress version 2.x, jQuery is a build-in Javascript library, explicitly include the jQuery library into WordPress is not necessary. What are you trying to do that it's not working?

  4. prionkor
    Member
    Posted 3 years ago #

    Hi, the wp_enqueue_script function is not working for me. If i call the function <?php wp_enqueue_script( 'jquery' ); ?> in head section. Jquery in not including as i said. It is not only for jquery other scripts are not including also.

    I have done more research.

    1. When i installed some plugin that requires jquery it is loading jquery via wp_head().

    2. My written jquery scripts are not working even though jquery is loaded by the plugin unless i include the jquery path manually. like this: <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-1.4.4.min.js"></script>

    3. Is there some kinds of conflict going on? I used jQuery instead of $ in my code. So conflict should not happen right?

  5. tedinoz
    Member
    Posted 3 years ago #

    Hi, I'm no expert at this, but I have learnt the HARD way that you need to load wp_enqueu_script via an init (it is mentioned in the codex but there is no example given.)
    There's a decent demo here - http://www.wdmac.com/wp-enqueue-script or a more extensive tutorial via Lester Chan.
    Ted

Topic Closed

This topic has been closed to new replies.

About this Topic