javascript - How to write value of a checkbox to a span when checked? -


using knockoutjs, when either 1 of checkboxes checked, want output value <span> text, so

-webkit-transition: <span data-bind="text: menueffect"></span> 0.2s ease-in-out; -moz-transition: <span data-bind="text: menueffect"></span> 0.2s ease-in-out; transition: <span data-bind="text: menueffect"></span> 0.2s ease-in-out; 

my checkboxes:

<div>     <input type="checkbox" value="max-height" data-bind="checked: menueffect" />slide in/out </div> <div>     <input type="checkbox" value="opacity" data-bind="checked: menueffect" />fade in/out </div> 

i'm trying output value of checkboxes in span tag, cant quite work?

my viewmodel:

self.menueffect: ko.observablearray(["max-height", "opacity"]); 

any ideas helpful ?

i think trying achieve: jsfiddle.net/7zc4v/3

the thing different changed : =

self.menueffect= ko.observablearray(["max-height", "opacity"]); 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -