WordPress.org

Ready to get started?Download WordPress

Forums

BUG: WordPress's jQuery is not fully functioning. (3 posts)

  1. trusktr
    Member
    Posted 4 years ago #

    The jquery that comes built in with wordpress doesn't fully work.

    I have a theme that calls jquery using wp_enqueue_script() so that there are no conflicts if any other plugins need jquery.

    However, my theme will not work with WordPress's built in jQuery. Instead, i have to replace the wordpress jQuery with the content from the latest jQuery over at jQuery.com and then my theme will work and all other plugins and features that rely on jQuery continue to work.

    Please email at jp@bettafootwear.com if you have any questions about the bug. Thanks!

  2. TruSktr,
    If you want to use the built in jquery that comes with WordPress you have to make sure you call it using the no conflict method ie:

    jQuery(document).ready(function()

    instead of:

    $(document).ready(function()

    I noticed on your site bettafootwear.com you calling it using the regular $ method which is why the built in jQuery won't work.

  3. trusktr
    Member
    Posted 3 years ago #

    Hey c3m, i forgot to subscribe to the post heheh..

    Anyways, I'm calling it using wp_enqueue_script() in my header.php. So only one jQuery is loading. I'm not sure what it is you mentioned above though...

    Jquery normally works for me, it's just that this new theme also needs jQuery and it was hard coded in the template (so my site had two jQueries and it was crashing it).

    When I replaced the hard code with wp_enqueue_script(), that fixed my site to load only one script... however, the features of my theme weren't working but wordpress specific features/plugins continued to work...

    When I replaced wordpress's jQuery file with the latest one from the jQuery website, that fixed everything. So it lead me to believe that there was some flaw in the wordpress one.

    Does that have to do with what you mentioned?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags