I have a data-bind="click: ..."
event in Knockout.js and I'm trying to disable it whenever a disabled
class is presence in the element.
<span class="disabled" data-bind="click: alerting">Two</span>
I'm trying this without success:
$('.disabled').click(function(e){
e.preventDefault();
});
I prefer to do it by using a classname as this way I can handle both the styling of the element and the interaction with it for multiple elements in the site.