I have Following working code:
var transforms = {
'renderTimeline':[ {
tag: "a",
class: "btn btn-warning btn-circle",
style: "float: right;",
html: "<i class=\"icon-remove\"></i>",
"onclick": function(e) {
delSchedule(e);
}}
}]
}
If I am passing the following json :
{ monday:[ { startTime:10:00, endTime: 12:00, room_id:cse124 }, { startTime:13:00, endTime: 15:00, room_id:lotus } ] }
And I invoke the transform like this :
$('#someplace').json2html(data.monday, transforms.renderTimeline, {'events': true});
I want to be able to access "monday" in the function delSchedule(). How do i do this? Please help.