In knockout, I am using ko.cleanNode($("#aDivInPartialView")[0]) to clean a node before applying binding second/multiple times because of change in view model occurred by drop down changes. My question is why do I have to pass this index value and what is the significance of it?
Asked
Active
Viewed 157 times
1 Answers
0
ko.cleanNode is for internal use. Apart from that, the importance of the index is related to what $element
is. Although there is such a special variable, it is used in the HTML, not in the JS. Most likely in your code it is the result of a jQuery selector, which returns a nodelist, and you want the first retrieved item.