Is there a way to have this prototype js trigger only when dom is changed and not loaded?
you can observe elements changing like this
$('element').observe('change',function(e){ } );
This is reserved for form elements though - textarea, select and input.
The final code would look something like:
document.observe('dom:loaded', function() {
$('element').observe('change',function(e){
// do something here
});
});