Forums

loading the jquery library to the page (3 posts)

  1. ads1018
    Member
    Posted 2 months ago #

    I wrote a jquery script on my page without using wp_enqueue_script('jquery') to load the jquery library and it worked. How is this possible? What then is the use of wp_enqueue_script('jquery')?

  2. t31os_
    Member
    Posted 2 months ago #

    Do you have any plugins that are using jQuery?

    I can't use jQuery without the above, so it may be that a plugin is already loading jQuery for you.

    Link to the page perhaps?

  3. Otto42
    Moderator
    Posted 2 months ago #

    wp_enqueue_script('jquery') basically just says you need jQuery on the page. If jQuery is not already being loaded by something else, then it gets loaded. If jQuery is already being loaded by something else, it does nothing.

Reply

You must log in to post.

About this Topic