Is it possible to use variables and data in in-template css properties?

Posted by aruman89 on Stack Overflow See other posts from Stack Overflow or by aruman89
Published on 2013-11-02T03:42:24Z Indexed on 2013/11/02 3:53 UTC
Read the original article Hit count: 114

Filed under:
|
<td style="width:77px" id="<%=id%>"><div class="condbar"><div  class="condprogress" style="width:Data.condition%; background:condColor"></div> <div class="condvalue"><%=condition%><span>%</span></div></div></td>

I want to set the width of a div .roster_condprogress as a percentage according to data and change the color accordingly (using a variable for that). What is a correct way to write this? (if it exists)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about css