• prionkor

    (@prionkor)


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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter prionkor

    (@prionkor)

    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!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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?

    Thread Starter prionkor

    (@prionkor)

    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?

    tedinoz

    (@tedinoz)

    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 – https://www.wdmac.com/wp-enqueue-script or a more extensive tutorial via Lester Chan.
    Ted

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with wp_enqueue_script. jQuery not loading.’ is closed to new replies.