How do I listen for changes to an attribute?

How do I listen for changes to an attribute?

Hi All,

I need to capture when a value on an input element changes, and take action accordingly. I can't figure out how to implement this. Any suggestions?

$("#selected-date-range").attr("value").bind('change', function(event) {
   alert( $("#selected-date-range").attr("value") );
});


thx