Hi
Using jQuery full version 3.3.0. My code:
html:
js:
- $( document ).ready(function(){
- $(document).on("click", "div", function(){
- $("div").animate({"background-color": "rgb(100,100,100)"}, 500); // don't work!!!
- $("div").animate({backgroundColor: "rgb(100,100,100)"}, 500); // don't work!!!
- $("div").animate({width: "+=200px"}, 500);
- //$("div").css({"background-color":"#f00"});
- });
-
- });
css:
- div {
- width: 200px;
- height: 100px;
- background: #fff;
- border: 1px solid blue;
- position: relative;
- }
Don't have any errors in console. What is wrong?