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 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.

JSFIDDLE:

Code:

  & 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/   

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 :)

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -