Home › Forums › Calendar Products › Events Calendar PRO › Tooltip on click
- This topic has 7 replies, 3 voices, and was last updated 7 years, 9 months ago by Kerry Sykes.
-
AuthorPosts
-
July 13, 2016 at 1:35 am #1139037Kerry SykesParticipant
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,
July 13, 2016 at 2:42 pm #1139370NicoMemberHi 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,
NicoJuly 14, 2016 at 1:38 am #1139543Kerry SykesParticipantHi 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.
July 15, 2016 at 2:27 pm #1140568NicoMemberThanks 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,
NicoJuly 19, 2016 at 1:04 pm #1141663NicoMemberHey 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,
NicoJuly 27, 2016 at 11:48 am #1144799Kerry SykesParticipantThank you very much for your assistance
July 27, 2016 at 3:23 pm #1144878NicoMemberYou 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 -
AuthorPosts
- The topic ‘Tooltip on click’ is closed to new replies.