Solved

Get rid of red asterisks

Posted on 2011-09-19
5
284 Views
Last Modified: 2012-08-13
I want to change this:

<font color="red">*</font>

to this:

<font></font>

using jQuery.


Thank you,

Tom

0
Comment
Question by:knowlton
  • 3
5 Comments
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 100 total points
ID: 36561244
$("font[color='red']").html("");
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36561252
please note : http://www.w3schools.com/TAGS/tag_font.asp
The font element is deprecated.

you may use : $("font:contains('*')").replaceWith("<font />");
test page : http://jsfiddle.net/udxDD/
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 400 total points
ID: 36561262
with the red color : $("font:contains('*'):[color='red']").replaceWith("<font />");
test page : http://jsfiddle.net/udxDD/1/
0
 
LVL 5

Author Closing Comment

by:knowlton
ID: 36561519
thx
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36561533
please note you don't need the colon before [color : $("font:contains('*')[color='red']").replaceWith("<font />");
http://jsfiddle.net/udxDD/2/
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

by Julian Matz As of jQuery (http://jquery.com/) 1.4 the .live() method (http://api.jquery.com/live/) supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now