Summary:
I have a customized javascript calendar that offers different viewing options such as day, week, and month. These views display events with specific class names. My current challenge is finding an effective method to toggle the visibility of these events on or off across all views without losing the changes when switching between views.
$("button").click(function () {
$(".calendar_event").toggle();
});
Initially, I utilized the above script to toggle the event's inline properties, but encountered issues when the view was changed and the dynamically reloaded event reset its display style back to default.
Another approach I attempted involved assigning a hidden class with a 'display: none' property;
$('button').toggle(function () {
$(".calendar_event").addClass("hidden");
}, function () {
$(".calendar_event").removeClass("hidden");
});
Regrettably, this method also failed to maintain the desired behavior when switching views.
If anyone has a solution to this dilemma, I would greatly appreciate your input.
Sincerely, Tim