I need to call a javascript function from a span tag on kendo ui grid. I've implemented as below, but it isn't work. // Kendoui grid
c.Template(m => { }).ClientTemplate(@"<a><span class='k-icon k-i-plus hide-row-grid'></span></a>");
// Javascript
$('.hide-row-grid').click(function () {
alert('hide button click');
});
Please help me resolve it. Thanks
USe event delegation for binding events to dynamically creating objects,
$(document).on("click", ".hide-row-grid", function () {
alert('hide button click');
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.