You are building an ASP.NET control.
The control displays data by using a table element with a class attribute value of Results.
The control should expose a client-side event named onrowselected that fires when a check box in a table row is selected.
You need to implement this client-side event.
What should you do?
A.
$(‘.Results input:checked’).onrowselected = function (e, sender) {
…
};
B.
$(‘.Results input:checked’).bind(‘onrowselected’, function (e, sender) {
…
});
C.
$(‘.Results’).bind(‘onrowselected’, function (e, sender) {
…
}).click(function (e) {
if ($(e.target).is(‘input:checked’)) {
$(‘.Results’).trigger(‘onrowselected’, [$(e.target)]);
}
});
D.
$(‘.Results’).onrowselected($.proxy($(this).find(‘input:checked’), function (e, sender) {
…
}));