From f1f4193f8b8607084c0ac56a7ecffe2b56e8a68e Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 5 Apr 2016 15:18:21 -0300 Subject: Try javascript again --- public/js/calendar.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/public/js/calendar.js b/public/js/calendar.js index 33fceb8..57d9095 100644 --- a/public/js/calendar.js +++ b/public/js/calendar.js @@ -11,17 +11,17 @@ $(function() { $(this).next().toggle('fast'); return false; }).next().hide(); -// $('.tabcal-cell a').each(function(i,a) { -// var hashpos = a.href.indexOf('#'); -// if (hashpos < 0) -// return true; -// var hash = a.href.slice(hashpos); -// if (!hash.startsWith('#event-')) -// return true; -// a.click(function() { -// show_event(hash); -// return false; -// }); -// }); -// hide_events(); + $('.tabcal-cell a').each(function(i,a) { + var hashpos = a.href.indexOf('#'); + if (hashpos < 0) + return true; + var hash = a.href.slice(hashpos); + if (!hash.startsWith('#event-')) + return true; + a.onclick = function() { + show_event(hash); + return true; + }; + }); + hide_events(); }); -- cgit v1.2.1