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.
Giving a class
with a span
wrapping.
var spanText = '<span class="logictext">Based on the severity High</span>' ;
And then wrote css for those class
es.
Or you can give inline css as well:
var spanText = '<span style="color: #f00;">Based on the severity High</span>' ;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.