customd / jquery-calendar

A full day, week, and resource calendar for use with jQuery.
MIT License
62 stars 26 forks source link

Last Resource in Resource View undefined #27

Open infopete opened 10 years ago

infopete commented 10 years ago

Hi I've added the code snippet you gave me to the resource.html from the examples to get the date, time and the resource on the calendar click event.

$('#calendar').on('click', '.ui-cal-time', function (e) {
    var dt = $(this).closest('.ui-cal-resource').attr('date');

    var st = $(this).attr('time');
    var res = $(this).closest('.ui-cal-resource').attr('resource');
    alert(res);
    }

It works great for Studio 1 to Studio 3 but you get "undefined" for Ground Floor.

Any ideas?

Pete