knockout.js - Get bindings from observable -


How can I get the data-wrap string or dot nodes, which is an observable is? I knocked on my web page. Validation.js, and one of my default assumptions ( required ) is being removed. I want to know which is for example validateSync @ knockout.validation.js

You can use jquery to get the actual value of the Data Bind feature

  & lt; Span data-bind = "value: test" & gt; & Lt; / Span & gt; $ (Function () {// "value: test" alert ($ ('span').} ('Data-bound');};  

In addition, If you really want to get the actual object that is bound to you, you can use the ko.dataFor function.

ko.dataFor (element) - returns the data that gives the element Was available for binding against .contextFor (element) - provides the complete binding reference that was available for the DOM element.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -