Change only color of * in div using jquery -


i wondering there way change color of * in label? have this:

<label>name*</label> 

and want change color of * this

<label>name<color='red'>*</color></label> 

is possible jquery? know there wrap in jquery, can wrap 1 character,in case * ? in advance help.

try this

$('label').html($('label').html().replace('*','<span style="color:red">*</span>')); 

demo


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -