0

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">
 $(function($){
 $("#daily_type").change(function()
{
  logic = $(this).val()

  LogicShow(logic)
})
function LogicShow(logic)
{

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

}
});

</script>

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

2
  • Question is quiet confusing,can u add little more please? where you want to pass the text? Commented May 18, 2012 at 11:33
  • here i am passing text in <td> by the help of jquery Commented May 18, 2012 at 11:37

1 Answer 1

1

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>' ;
Sign up to request clarification or add additional context in comments.

2 Comments

here i am using <td> element of html.
@samarth then use td instead of span

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.