I wrote a javascript function for Telerik RadTreeView as follows:
function CheckedNodeValues() {
var checkedNodes = $(this).get_checkedNodes();
for (var n in checkedNodes) {
checkedNodes[n].get_value();
}
}
I would like to be able to do myRadTreeView.CheckedNodeValues() as opposed to CheckedNodeValues(myRadTreeView);
Is there a way to add a function to a class in Javascript?
I hope what I’m asking is clear, ideally, I would like extend the methods available on a class.
Something like this should do ..