span change jquery

JavaScript
$(document).ready(function(){
    $("#span1").on('DOMSubtreeModified',function(){
         // text change handler
     });

 });
 

Source

Also in JavaScript: