About
Pricing
Community
Teams
Start Free Trial
Log in
shampouya
asked on
3/12/2012
Why does my javascript statement stop working once I use jquery?
This line in my js file seems to stop working if I try to change my website color from pink to purple (see webpage below):
document.getElementById("s
ubmit").cl
assName = 'formButtonPurple';
http://www.pouyarebek.com/wdiclass/assignment4/homework4.html
JavaScript
HTML
4
1
Last Comment
shampouya
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Sudhindra A N
3/12/2012
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
shampouya
3/12/2012
ASKER
Ok these two ways seem to work now. Is there no difference between these two in terms of which one gets preference?
$(".formButton").css("back
ground-col
or", "#5959ff");
document.getElementById("s
ubmit").st
yle.backgr
ound = "#5959ff";
Sudhindra A N
3/12/2012
I personally prefer using jQuery method as there will be a uniformity in coding.
shampouya
3/13/2012
ASKER
thanks!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
$(".formButton").css("back
document.getElementById("s