1

Try <button class="action primary" data-bind="click: showPopup.bind($data)"> <span>Verify OTP</span> </button> Inside your method showPopup js code showPopup: function(){ var _self = this; console.log(_self.value()); }


1

You can put your js function direclty in html like this : <div class="primary" data-bind="afterRender: function(){ jQuery('button#phone').click(function() { alert('it works'); }); }"> <button id="phone" class="action primary"><span>Verify OTP</span></button> </div> If you ...


Only top voted, non community-wiki answers of a minimum length are eligible