Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Get rid of red asterisks

Posted on 2011-09-19
5
Medium Priority
?
292 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:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 40

Assisted Solution

by:Gurvinder Pal Singh
Gurvinder Pal Singh earned 400 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 1600 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:Tom 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
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)
Suggested Courses

688 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