Using jQuery I am catching the “document ready” event after you’ve already drawn the calendar, and my jQuery goes through and alters the click-on-an-event behavior. Actually what we do is modify the {A} tags to use -fancybox- to display the event registrations in a floating layer. It works great on a fresh page — exactly as I want. But when the user clicks the button to go to the next month or to change the month-week-day views, the calendar’s objects are changed (of course) and the calendar goes back to default EE behavior. ···· I’d like to be able to grab jQuery/javascript control right after the calendar code has rendered the new calendar range so I can re-apply my modifications to the {A} tags. I don’t need to know what the viewer actually clicked — only that the new calendar has just been rendered. Is there a way I can hook in or set a callback to catch this? ···· I’ll write something into the EE code if I need to, but you guys are so good you probably thought of this already.
Actually, you might try posing the question to Adam Shaw, the author of fullcalendar.js which is what we’re currently using for the calendar — or go through the documentation on his site. He would know far more about how his calendar works and what’s possible than any of us here would. Currently, we’re struggling with the limitations of the calendar as we’re fairly sure we’ve already stretched it to its limits and are planning on a rewrite and/or building our own calendar sometime after 3.2 is released. http://arshaw.com/fullcalendar/
The “fullCalendar” jQuery/javascript object exposes a callback named viewDisplay() that is called whenever the calendar “view” changes. It’s perfect. To get it to work, one has to insert the viewDisplay function definition within the instantiation of the calendar object, which means defining it within your EE code. However, I had already copied your [ESPRESSO_CALENDAR …] code and shortcode out (to custom_shortcodes.php) and highly modified it for our application, creating a new shortcode that does fancy stuff, and I was easily able to drop in the callback code, and it works perfectly for me. Very slick. Here’s where viewDisplay() is described -> http://arshaw.com/fullcalendar/docs/display/viewDisplay/
Viewing 2 reply threads
The support post ‘Can I hook into jQuery/javascript to know when calendar has been redrawn?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.