Support » Plugin: Events Manager » [Plugin: Events Manager] ajax loaded list of events with booking button

Viewing 9 replies - 1 through 9 (of 9 total)
  • How can I enable the js that performs the booking for the ajax loaded content?

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    hi, chances are you have JS on your site breaking the ajax from loading, if you have a link to a booking form we may be able to tell.

    Hi Marcus,

    I have this locally on my machine for now. I am using the #_BOOKINGBUTTON placeholder. From what I’ve noticed the js is not working for the ajax loaded content. If I click an element which should execute a function then nothing happens, unless I call that js function again after that ajax load is complete. But I don’t know what function I should call after the ajax load is complete for the booking button to work.
    Thank you!

    Any idea how I can re-enable the click events on the ajax loaded content?

    try to check the browser console if there’s any javascript error that can help us figure out the issue; also, check whether your theme loads a jquery version that is compatible with wordpress default jquery library.

    Hi aglonwl,

    There is no js error in the console. This issue happens only if I load that list with ajax, if I simply output in the page that list, it works fine to book the events, but I need to load that list with ajax.
    I need to reenable the click for the ajax loaded content. How can I call again the function that fires when clicking on the booking button in the ajax callback function?

    Many thanks for all your help!

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    chances are because the booking button isn’t present until after the document is loaded, our scripts don’t re-assign the events to the booking button.

    You probably need to copy this and have it execute after your ajax is done:

    //Manual Booking
    	$('a.em-booking-button').click(function(){
    		var button = $(this);
    ....

    See includes/js/events-manager.js around line 383 to 432

    Thank you so much Marcus, this fixed it! God bless you!

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    glad it worked 😉

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Events Manager] ajax loaded list of events with booking button’ is closed to new replies.