TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankush Rathod
NA
228
11.7k
How to change color dynamically for specific text in val()
Jul 25 2017 10:48 AM
How to change color dynamically for specific text in jquery val() function.
- I want to change color for specific text and below is my code;
$("#" + id).val("141"+ " " + "(Only 140 characters will be shown on Twitter)").css('color', 'red');
- I have implemented this code but red color has set for all text.
- I would like to set color red for "141" only.
- Also, I have tryed with different solution like, 1) using <span> tag for "141" text. 2) using append, But I'm not getting proper result.
- Please suggest me proper answer for this code.
Reply
Answers (
2
)
unable to get particular data from xml using jquery
Allow Vertical Selection in the web Grid