I am looking to create a system which on signup will create a subdomain on my website for the users account area.
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update
Cisco Certified Network Associate Exam,640-802 CCNA All Answers ~100/100. Daily update
Here I have an example code:
<div data-bind="foreach: someData1">
<a href="#" data-bind="click: myFunction"></a>
</div>
<div data-bind="foreach: someData2">
<a href="#" data-bind="click: myFunction"></a>
</div>
How inside myFuncion code to know when it's called: when foreaching someData or someData2?
You can access both the item and the click event in myFunction.
ReplyDeleteviewModel.myFunction = function (item, event) {
// event.target = <a>
};
You should check out the official Knockout documentation for the click binding.