knockout.js - Toggling between two chunks of markup with Knockout's fadeVisible? -
I have two parts of markup that I can toggle between using the JSFIDDLE: Code: This should work .. Wrap the box in the container and fill the container with the children. Edit: Hi, looking through my old answers And thought that I have to do one more time. Well I found a solution that works) Basically, do not use knockout for visual / dom manipulation, it is not a primary role, instead use the Juke that manipulate the dom, because it is the primary role. This will work without a display type :) fadevisible binding Trying handler In this scenario, I can make smooth changes - there is no such thing - is it possible? Unfortunately, I can not use the
status: absolute or
fixed because my container element needs to scale with content.
& lt ;! - to be feasible: show - & gt; & Lt; div data-bind = "text: name" & gt; & Lt; / Div & gt; & Lt ;! - / ko - & gt; & Lt ;! Fadeable to: Show () - & gt; & Lt; Div data-bound = "text: 'jones'" & gt; & Lt; / Div & gt; & Lt ;! - / ko - & gt; & Lt; Input type = "checkbox" data-bind = "checked: show" />
jsfiddle.net/xH3mh/10/
Comments
Post a Comment