Take the 2-minute tour ×

I have a with id this is logic so here i am sending text dynamically now i want to resize and recolour this text. my jquery look like this

<script type="text/javascript">
  logic = $(this).val()

function LogicShow(logic)

  if ( logic == "iss" )
    var spanText = "Based on the severity High" ;
  if ( logic == "unix" )
    var spanText = "Summary reflects based on the number of events.Such as how many times number of events observed" ;



so now how can i pass text with some good text format and colour.

share|improve this question
Question is quiet confusing,can u add little more please? where you want to pass the text? –  N0nh4x0r ツ May 18 '12 at 11:33
here i am passing text in <td> by the help of jquery –  SSP May 18 '12 at 11:37
add comment

1 Answer

up vote 1 down vote accepted

Giving a class with a span wrapping.

var spanText = '<span class="logictext">Based on the severity High</span>' ;

And then wrote css for those classes.

Or you can give inline css as well:

var spanText = '<span style="color: #f00;">Based on the severity High</span>' ;
share|improve this answer
here i am using <td> element of html. –  SSP May 18 '12 at 11:33
@samarth then use td instead of span –  thecodeparadox May 18 '12 at 11:37
add comment

Your Answer


