3

I'm using a method as suggested in this Stackoverflow Question, to recreate the jQuery slideDown function using animate, so that I can use the step property.

However, I can't get the step property to work. Here is my code:

    infoClone.animate({
        "height": "show",
        "marginTop": "show",
        "marginBottom": "show",
        "paddingTop": "show",
        "paddingBottom": "show",

        step : function() {
            console.log('Step!');
        }
    });
Community
  • 1
  • 1
shrewdbeans
  • 11,971
  • 23
  • 69
  • 115

2 Answers2

5

You should change it to

infoClone.animate({
    "height": "show",
    "marginTop": "show",
    "marginBottom": "show",
    "paddingTop": "show",
    "paddingBottom": "show"
    }, {
    step : function() {
        console.log('Step!');
    }
});
Yograj Gupta
  • 9,811
  • 3
  • 29
  • 48
2

try this:

infoClone.animate({
        "height": "show",
        "marginTop": "show",
        "marginBottom": "show",
        "paddingTop": "show",
        "paddingBottom": "show"
},
{
  step : function() {
            console.log('Step!');
        }
});
Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171