Skip to:
Content
Pages
Categories
Search
Top
Bottom

jQuery Problems

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    You’ve probably got an older version of jquery loading after the bp stuff. What other plugin or custom jquery code do you have running? Two conflicting jquery libs cause this problem.

    Avatar of Joshasbury
    joshasbury
    Participant

    @joshasbury

    Here is what I have loading:

    ‘<?php wp_enqueue_script(‘jquery-ui-core’); ?>

    <?php wp_enqueue_script(‘ui.datepicker’, get_stylesheet_directory_uri() . ‘/library/custom/js/1.5.3/ui/ui.datepicker.js’, array(‘jquery’), 0.1); ?>

    <?php wp_enqueue_script(‘council-contact-intake’, get_stylesheet_directory_uri() . ‘/library/custom/js/council-contact-intake.js’, array(‘jquery’), 0.1); ?>

    <?php wp_enqueue_script(‘autotab’, get_stylesheet_directory_uri() . ‘/library/custom/js/autotab.js’, array(‘jquery’), 0.1); ?>’

    Most of my jQuery is using the UI libs for showing/hiding stuff based on what the user is doing on the form. What’s the best way to do this to ensure that I don’t nuke BP? With BuddyPress installed, what’s the best practice for me handling my jQuery needs?

    Thanks!

    I believe you should tie your dependency to jquery-ui-core, i.e.:

    <?php wp_enqueue_script('ui.datepicker', get_stylesheet_directory_uri() . '/library/custom/js/1.5.3/ui/ui.datepicker.js', array('jquery-ui-core'), 0.1); ?>

    Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    @PerS you have experience with js? Andy is looking for some help in that area. Another pair of eyes : http://buddypress.org/forums/topic.php?id=847

    Avatar of Joshasbury
    joshasbury
    Participant

    @joshasbury

    Thanks, PerS. This is strange. I am adding the jQuery as part of a page template in order to generate a customized form. In order to debug, I went ahead and removed all of my jQuery calls, but the error still remains.

    I have added a call to a test script which simply generates an alert on document.ready but it doesn’t get called because of the .livequery error.

    Avatar of Joshasbury
    joshasbury
    Participant

    @joshasbury

    ….Ahhhh…. <slaps self on forehead>….I got this working. My theme was including another version of jQuery in the header which was causing the conflict. I commented out the line, and everything is working as planned.

    Thanks for your help!

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.