title: How can I crawl the page for checkbox/radio/text inputs and detect changes to their original values?
body: <p>All of my checkbox, radio, and text inputs have '_boom' appended to the end of the id. I want to crawl the page for these id's, detect changes to see if any one of them is different from their original state, and if so, apply CSS to a button called 'save' on the page. Here is what I have so far but it doesn't work:</p>
  
  <pre><code>$('[id*="_boom"]').change(function() {
          var sType = $(this).getInputType(); //get the type of attribute we're dealing with
          if( sType === "checkbox" || sType === "radio" ){ //checkbox or radio type
              var originalCheckedState = $(this).prop("defaultChecked");
              var currentCheckedState = $(this).prop("checked"); 
  
              if(currentCheckedState !== originalCheckedState){
                  $("a#save").css("color","#CCCCCC"); 
              }
          }
  
          if( sType === "text" ){ //text type
              var originalValue = $(this).prop("defaultValue");
              var currentValue = $(this).val();
  
              if(currentValue !== originalValue){
                  $("a#save").css("color","#CCCCCC"); 
              }
          }
  
      }); 
  </code></pre>