I'm currently using Knockout JS on one of my projects and the
problem that I'm encountering is related to form elements.
Basically the input's ( text, checkbox, radio, etc ) which are
manipulated by knockout.js should also be 'using' jqTransform.
I've tried triggering jqtransform inside the (document).ready but
obviously is not working - dohhh! I also read somewhere on the forum
that this ( http://knockoutjs.com/documentation/template-binding.html#note_3_usin...
) might be my solution. Still can't apply jqTransform.
Did anyone on this forum use these two scripts together, if yes, how
did you get it to work :)? Or if there's anyone around here who could
help, it'd be much appreciated.
2
votes
Can you put this into a jsfiddle? Here is one you can fork from: jsfiddle.net/HCQAd/1
- Jason More
@JasonMore: thanks for your reply, but unfortunately I can't post it to jsfiddle as there is some heavy backend involved in it ( nor I can't grant access to the dev site ) - sorry. I was hoping that someone else encountered the issue...
- Seb
I am having the same issue with checkboxes. actually the viewmodel does get updated, but only upon the second click. And it seems to get updated with the previous value.
- Manu
1 Answers
0
votes
The reason you cannot use it together is because jqTransform literally replaces input[type=checkbox] that you have all your knockout bindings on with an "A" (link) elements that don't know anything about knockout first and don't even care to move the events handlers and attributes your input already had.
The source code tells it all: https://github.com/jcamenisch/jqTransform/blob/master/jqtransformplugin/jquery.jqtransform.js