File Editor
Directories:
.. (Back)
__tests__
Files:
rsvp-ari.js
rsvp-ari.min.js
rsvp-block.js
rsvp-block.min.js
rsvp-manager.js
rsvp-manager.min.js
rsvp-tooltip.js
rsvp-tooltip.min.js
tickets-block.js
tickets-block.min.js
tickets-commerce.js
tickets-commerce.min.js
tickets-loader.js
tickets-loader.min.js
tickets-page.js
tickets-page.min.js
tickets-utils.js
tickets-utils.min.js
Create New File
Create
Edit File: tickets-page.js
/** * Makes sure we have all the required levels on the Tribe Object * * @since 5.0.3 * @type {object} */ tribe.tickets = tribe.tickets || {}; /** * Configures ET tickets page Object in the Global Tribe variable * * @since 5.0.3 * @type {object} */ tribe.tickets.page = {}; /** * Initializes in a Strict env the code that manages the plugin tickets page. * * @since 5.0.3 * @param {object} $ jQuery * @param {object} obj tribe.tickets.page * @return {void} */ ( function( $, obj ) { const $document = $( document ); /* * Ticket Page Selectors. * * @since 5.0.3 */ obj.selectors = { container: '.tribe-tickets__tickets-page-wrapper', }; /** * Binds events for container. * * @since 5.0.3 * @param {jQuery} $container jQuery object of object of the tickets page container. * @return {void} */ obj.bindEvents = function( $container ) { $document.trigger( 'beforeSetup.tribeTicketsPage', [ $container ] ); $document.trigger( 'afterSetup.tribeTicketsPage', [ $container ] ); }; /** * Handles the initialization of the tickets page events when Document is ready. * * @since 5.0.3 * @return {void} */ obj.ready = function() { const $ticketsPage = $document.find( obj.selectors.container ); // Bind events for each tickets block. $ticketsPage.each( function( index, block ) { obj.bindEvents( $( block ) ); } ); }; // Configure on document ready. $( obj.ready ); } )( jQuery, tribe.tickets.page );
Save Changes
Rename File
Rename