knockout binding with bootstrap color picker

995 views
Skip to first unread message

brea...@gmail.com

unread,
Jan 6, 2013, 4:08:09 AM1/6/13
to knock...@googlegroups.com
Hi,

I am new to knockout and trying to bind a color for color picker of bootstrap.

The regular way for color picker will be:

  <div class="input-append color" data-color="rgb(0,194,255,0.78)" data-color-format="rgba">     

      <input type="text" class="span3" value="rgb(0,194,255,0.78)" id="picker" data-color-format="rgba">

      <span class="add-on"><i style="background-color: rgba(0,194,255,0.78)"></i></span>
   
 </div> 

I want to bind all 'rgb(0,194,255,0.78)'  to a value in knockout model.  Not sure how to implement it.  

Thanks in advance,
Best,
James

Michael Latta

unread,
Jan 6, 2013, 12:09:47 PM1/6/13
to knock...@googlegroups.com
Look at these 2 documentation pages for binding to styling:

http://knockoutjs.com/documentation/css-binding.html
http://knockoutjs.com/documentation/style-binding.html

Michael
> --
>
>

Reply all
Reply to author
Forward
0 new messages