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

x
?
Solved

Why am I not able to add a class here using jquery?

Posted on 2012-03-22
2
Medium Priority
?
281 Views
Last Modified: 2012-03-22
In line 44 of my page5.js code, I try to change the background color of an input field using this jquery statement, but it's not working. Any idea why? (I included my site link below too)

$("#firstName").addClass("redClass");

my webpage
0
Comment
Question by:shampouya
[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
2 Comments
 
LVL 15

Accepted Solution

by:
StingRaY earned 2000 total points
ID: 37755854
Try adding "!important" to your redClass:

input.redClass{
	background-color:#FFFFFF !important;}

Open in new window

0
 

Author Closing Comment

by:shampouya
ID: 37755893
That worked, thanks!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

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