Tooltip on click

Home Forums Calendar Products Events Calendar PRO Tooltip on click

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1139037
    Kerry Sykes
    Participant

    Hi,

    Please could you outline the process needed to change the month view tooltip to action on click as oppose to hover?

    I have managed to remove the anchor link for the event date but not managed to change the js file to enable tooltip on click.

    When I change the event handle in events.js to onclick the tooltip doesn’t load in the page.

    Cheers,

    #1139370
    Nico
    Member

    Hi there Kerry,

    Thanks for reaching out to us on this! I can help you on this 🙂

    I have managed to remove the anchor link for the event date but not managed to change the js file to enable tooltip on click.

    Can you describe how you did this? Via template override?

    When I change the event handle in events.js to onclick the tooltip doesn’t load in the page.

    Were you following this answer? It seems to be a bit outdated but the method is still legit.

    Please let me know about how you are trying to do this, maybe we’ll need to do thing in a different way but we can also improve/compete your solution,
    Best,
    Nico

    #1139543
    Kerry Sykes
    Participant

    Hi Nico,

    That’s great news.

    I removed the anchor manually from within – views > month > single-event.php

    I’ve tried following the outdated method posted by Jonah with no luck.

    I then tried to change the line on tribe-events-js to overide the current js with no luck (see below)

    $( ‘#tribe-events’ ).on( ‘mouseenter’,

    Many thanks.

    #1140568
    Nico
    Member

    Thanks for following up Kerry!

    I poked this a bit today but couldn’t find the definitive solution yet (I could unbind the mouseenter action and load a custom copy of the js but still having some issue to show the tooltip on click). I’m a bit short of time right now but I’ll continue to work on this next week!

    Thanks for the patience,
    Have a great weekend,
    Nico

    #1141663
    Nico
    Member

    Hey Kerry,

    Hopefully I could nail this today after a second look!

    Add the following snippet to your theme’s (or child theme’s) functions.php file:


    /* Exchange calendar script to modify how toolstips show up */
    function tribe_change_calendar_script() {

    wp_deregister_script('tribe-events-calendar-script');

    wp_register_script('tribe-events-calendar-script', get_template_directory_uri().'/tribe-events/js/tribe-events.js');

    $js_config_array = array(
    'permalink_settings' => get_option( 'permalink_structure' ),
    'events_post_type' => Tribe__Events__Main::POSTTYPE,
    'events_base' => tribe_get_events_link(),
    );

    wp_localize_script( 'tribe-events-calendar-script', 'tribe_js_config', $js_config_array );
    }
    add_action('wp_enqueue_scripts', 'tribe_change_calendar_script' );

    With that code in place, you’ll need to add the modified copy of tribe-events.js to wp-content/themes/YOUR_THEME/tribe-events/js/tribe-events.js, and save the following code to the file:

    https://gist.github.com/niconerd/bd3be1f261e9d59bf42a37fcea4aa29e

    Please give this a try and let me know if it works for you,
    Best,
    Nico

    #1144799
    Kerry Sykes
    Participant

    Thank you very much for your assistance

    #1144878
    Nico
    Member

    You are welcome Kerry 🙂

    Stocked to see this is resolved! This one was a tricky issue for sure.

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Best,
    Nico

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Tooltip on click’ is closed to new replies.