1

I have this code:

$("#my_div").animate({
      "margin-left": "-145px",
      "background-color": "#ffffff",
      "width": "1240px",
      "padding": "6px 6px 6px 6px",
      "border-radius": "6px",
      "box-shadow": "0px 0px 9px #323232",
      "-webkit-box-shadow": "0px 0px 9px #323232"
}, 1000);

But the box-shadow and padding styles aren't applied. I can't spot the error...

NaYaN
  • 1,300
  • 7
  • 11
spiderman
  • 1,565
  • 2
  • 16
  • 37

1 Answers1

0

Try this:

$("#my_div").animate({
      "margin-left": "-145px",
      "background-color": "#ffffff",
      "width": "1240px",
      "padding": "6px 6px 6px 6px",
      "border-radius": "6px",
      boxShadow: "0px 0px 9px #323232", //change here
      paddingTop:'6px',
      paddingLeft:'6px',
      paddingRight:'6px',
      paddingBottom:'6px',
}, 1000);

Reference: Correct way to animate box-shadow with jQuery

Community
  • 1
  • 1
Code Lღver
  • 15,573
  • 16
  • 56
  • 75