Custom JQuery in functions.php

Home Forums Ticket Products Event Tickets Plus Custom JQuery in functions.php

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1445824
    atl-bia
    Participant

    Hi, I am using a plugin called Event Tickets Plus and I am trying to customize some it, based on instruction from the developers.
    I am supposed to put the following code, which includes JQuery, in the functions.php file (in my Avada Child Theme). It doesn’t seem to be working and I’m wondering if there’s something about Avada that is preventing this implementation? I did switch the theme to Twenty Seventeen, and the customization did work, so it seems to be some conflict with Avada. Here’s the code:

    function cliff_rsvp_default_quantity() {
    wp_enqueue_script( ‘jquery’ );
    ?>

    jQuery(document).ready( function () {
    jQuery( ‘input.tribe-ticket-quantity’ ).val( 1 ).prop( ‘readonly’, true );
    });

    <?php
    }
    add_action( 'wp_head', 'cliff_rsvp_default_quantity' );

    #1445825
    atl-bia
    Participant

    ps there are script tags around the JQuery coding that got pulled out by your submission form

    #1445836
    atl-bia
    Participant

    Nevermind, I think I figured it out!

    #1446592
    Courtney
    Member

    Thanks Alan. I’ll close out this thread for now. Do let us know if you need further support.

    Thanks
    Courtney 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom JQuery in functions.php’ is closed to new replies.