jQuery replace click() with document.ready() : <p>SO I found this jquery function: <a href="http://codepen.io/niklas-r/pen/HsjEv" rel="nofollow">http://codepen.io/niklas-r/pen/HsjEv</a></p>

<p>html: </p>

<pre><code>&lt;p id="el"&gt;0%&lt;/p&gt;
&lt;button id="startCount"&gt;Count&lt;/button&gt;
</code></pre>

<p>JS:</p>

<pre><code>$("#startCount").on("click", function (evt) {
var $el = $("#el"),
    value = 56.4;

evt.preventDefault();

$({percentage: 0}).stop(true).animate({percentage: value}, {
    duration : 2000,
    easing: "easeOutExpo",
    step: function () {
        // percentage with 1 decimal;
        var percentageVal = Math.round(this.percentage * 10) / 10;

        $el.text(percentageVal + '%');
    }
}).promise().done(function () {
    // hard set the value after animation is done to be
    // sure the value is correct
    $el.text(value + "%");
});
});
</code></pre>

<p>It increment numbers with animation. It doesnt work though, when I replace click with document.ready(). How do I make it work?</p>
