jQuery Animate not working on background-color property

0 votes
I was playing around with the jQuery .animate() function, and ended up trying to change the background-color of one of the divs depending on the number of pixels scrolled by the user. To my surprise, it did not work. I tried using the .css() function instead, and it worked well. Please refer the jsFiddle link at the bottom.

Could somebody explain to me why this is happening?
Jun 16 in JQuery by gaurav
• 12,420 points
7 views

1 answer to this question.

0 votes

The background color animate can be performed with the help of the animate() function or css() function. The background color animate is used to set the background color of the selected elements.

Image result for jQuery Animate not working on background-color property

answered Jun 16 by rajatha
• 3,540 points

Related Questions In JQuery

0 votes
1 answer

Error:jQuery scrollTop not working in Chrome but working in Firefox

Hello @kartik, If your CSS html element has the following overflow markup, scrollTop will ...READ MORE

answered May 29, 2020 in JQuery by Niroj
• 82,720 points
6,352 views
0 votes
1 answer

jquery timepicker cdnjs.cloudflare does not working

jQuery Timepicker can parse the most used ...READ MORE

answered Jun 1 in JQuery by Edureka
• 13,600 points
25 views
0 votes
1 answer

jQuery - remove background-color when an element is visible

$("#menu a"). css("background-color", ""); Setting the background-color to "" ...READ MORE

answered Jun 7 in JQuery by Edureka
• 13,600 points
14 views
0 votes
1 answer

jQuery Validation plugin. Two custom rules not working

validation plugin works according to the name attribute and ...READ MORE

answered 5 days ago in JQuery by rajatha
• 3,540 points
13 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,510 points
293 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,720 points
8,247 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,720 points
15,102 views
0 votes
1 answer

How to make Bootstrap popover Appear/Disappear on hover instead of click?

Hello @kartik, Set the trigger option of the popover to hover instead ...READ MORE

answered May 12, 2020 in JQuery by Niroj
• 82,720 points
1,179 views
0 votes
1 answer

jQuery on page load event not working

You should be passing .on("load") on the window instead ...READ MORE

answered 5 days ago in JQuery by rajatha
• 3,540 points
8 views
0 votes
1 answer

jQuery slideDown() animation not working

Your p element is already displayed when you enter ...READ MORE

answered Jun 16 in JQuery by rajatha
• 3,540 points
11 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP