How can I add "close" link to the tooltips?

Home Forums Calendar Products Events Calendar PRO How can I add "close" link to the tooltips?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #85016
    ckangell
    Participant

    Currently when the user scrolls over an event in the month view the tooltip window fades in and then fades out on the mouseleave event. I’d like to give users an option of clicking a close button to close the tooltip window. I tried to do this by adding a link in the single-event.php file and using a bit of jQuery in my themes js file to cause the tooltip window to close when the link is clicked. Works okay until I change the month. Then the link I added no longer functions. I’m guessing thats happening because of the Ajax. Any ideas on a better way?

    #85270
    Brook
    Participant

    Howdy ckangell,

    I think your close script is probably attaching itself onload. This is an issue when we run an ajax call, because onload will have already fired and your script will not attach itself to the new content. To remedy try reattaching your function once an ajax call is made. You can do that by replacing the console.log line in the following with your relevant functions:

    jQuery(tribe_ev.events).on(“tribe_ev_ajaxSuccess”, function () {
    console.log(“tribe_ev_ajaxSuccess”);
    });

    Does that work for you?

    – Brook

    #85738
    ckangell
    Participant

    This seems to work. Thanks for the help. I knew it had to involve the ajax, just didn’t know how to get to it.

    #86269
    Brook
    Participant

    Excellent! Glad to hear it.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How can I add "close" link to the tooltips?’ is closed to new replies.