jQuery Call a function when content of a div changes
<p>I have a span:</p>

<pre><code>&lt;span class="basket_amount"&gt;65.70&lt;/span&gt;
</code></pre>

<p>This span is updated via an external script. 
If the amount changes I want to trigger a javascript function.</p>

<pre><code>$(document).ready(function(){
    $('.basket_amount').on('change', function() {
        versandkosten();
    });  
});
</code></pre>

<p>Currently it does not work. But why?</p>

<p>Thanks a lot!</p>