javascript - Knockout binding for toggle switch -


i need bind jquery toggle switch knockout observables , please me correct approach mine not working

my html file looks :

html:

<select name="toggleswitch1" id="toggleswitch1" data-theme="b" data-role="slider" data-bind="option:activatenotification">     <option value="false">no</option>     <option value="true">yes</option> 

and view model :

javascript:

function selectvm(){     self = this;     self.activatenotification = ko.observable(true); } 

not 100% sure you're trying if trying bind selected option have use value: activatenotification


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -