title: .attr() related things stopped working after jquery upgrade 1.3.2 to 1.6.4, what else could be broken?
body: <p>I upgraded from jquery 1.3.2 to 1.6.4  and found some things in the existing code were not working - </p>
  
  <ol>
  <li><p>Disabling something -</p>
  
  <p><code>$(selector).attr("disabled","");</code></p></li>
  <li><p>Checking if radio button is checked or not -</p>
  
  <p><code>if($(selector).attr('checked'))</code></p></li>
  </ol>
  
  <p>I checked for backwards-incompatibility of the version releases <a href="http://jquery14.com/day-01/jquery-14" rel="nofollow noreferrer">1.4</a>, <a href="http://blog.jquery.com/2011/01/31/jquery-15-released/" rel="nofollow noreferrer">1.5</a> and <a href="http://blog.jquery.com/2011/05/03/jquery-16-released/" rel="nofollow noreferrer">1.6</a> and found mention of only the issue #2 but no explicit mention of issue #1 above. So I am afraid that like issue #1, I could find more issues with my existing code. I guess I missed something in the "Case-mapping of data- attributes" section of <a href="http://blog.jquery.com/2011/05/03/jquery-16-released/" rel="nofollow noreferrer">http://blog.jquery.com/2011/05/03/jquery-16-released/</a>. Could somebody please explain the same.</p>
  
  <p>Sources - <a href="https://stackoverflow.com/q/4960126/351903">Upgrading from jQuery 1.3.2 to jQuery 1.5 (or 1.4)</a></p>
  
  <p><strong>Update</strong>  </p>
  
  <p>I am still little confused with <em>appropriately</em> replacing <code>attr</code> with <code>prop</code>. I have read <a href="https://stackoverflow.com/questions/5874652/prop-vs-attr">.prop() vs .attr()</a> and a few other questions. Wherever I have read so far, it says in majority of the cases I need to do so. But which are the minority cases then? Can somebody give some code examples or situations? How do I find such cases in my existing code? I have also read  <a href="https://stackoverflow.com/a/6057122/351903">https://stackoverflow.com/a/6057122/351903</a> where it is mentioned that - </p>
  
  <blockquote>
    <p>The thing you really need to be careful with is just do not mix the
    usage of these for the same property throughout your application</p>
  </blockquote>
  
  <p>Do I need to replace <code>attr</code> to <code>prop</code> in case of such lines which are working fine now?</p>
  
  <pre><code>$(selector).attr("id")
  </code></pre>
  
  <p><strong>Update #2</strong><br>
  Suppose in my existing code, I have lines like following (which I guess directly affect the behavior or state of the UI widget), but currently there is no check to see if that element is checked or not - </p>
  
  <p>This is there  </p>
  
  <pre><code>$(selector).attr("checked","checked"); //setting
  </code></pre>
  
  <p>But this is not there</p>
  
  <pre><code>if($(selector).attr("checked")) //checking
  </code></pre>
  
  <p>Should I still replace <code>attr</code> to <code>prop</code> in the setting code, even though setting is working now? </p>
  
  <p><strong>Update #3</strong><br>
  Is there some place from where I can get some kind of a list of attributes which directly affect some property of the UI widget? I am still having confusions deciding for which attributes to replace attr to prop. Does anybody else new to this jquery version feel same or am I only one :D ? </p>
  
  <p><strong>Update #4</strong><br>
  It looks like, somewhere in between these two versions (1.3.2 to 1.6.4), jquery made element selection more strict. </p>
  
  <p><em>Details</em><br>
  In a module, have the following HTML - </p>
  
  <pre><code>&lt;div id="60table"&gt;
      &lt;div&gt;
          &lt;input type="CHECKBOX" id="60_1" value="1" name="data[reportsInfo][Campaign][2752]"&gt;
          &lt;label for="60_1"&gt;23 apr new campaign 1&lt;/label&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;input type="CHECKBOX" id="60_2" value="1" name="data[reportsInfo][Campaign][2753]"&gt;
          &lt;label for="60_2"&gt;23 apr new campaign 2&lt;/label&gt;
      &lt;/div&gt;
      &lt;div&gt;
          &lt;input type="CHECKBOX" id="60_3" value="1" name="data[reportsInfo][Campaign][2707]"&gt;
          &lt;label for="60_3"&gt;2nd camp added&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>With jquery 1.3.2, the following returned the actual count of inputs - </p>
  
  <pre><code>$("#60table INPUT[type='checkbox']").length
  </code></pre>
  
  <p>But, now with jquery 1.6.4, the above returns 0 (note that the position of the inputs is like #60table > div > input and not directly under #60table). I have to do  <code>$("#60table").find("INPUT[type='checkbox']").length</code> to get the correct number.</p>
  
  <p>Due to this, the following existing code stopped working after the upgrade, even though I replaced the <code>attr</code> with <code>prop</code> - </p>
  
  <pre><code>$("#60table INPUT[type='checkbox']").attr('checked', $("#60").attr("checked")); //I replaced the attr by prop here
  </code></pre>
  
  <p>So, I am still getting new issues where old code is no more working after the upgrade. </p>
  
  <p><strong>Putting bounty</strong><br>
  Because -  </p>
  
  <ul>
  <li><p><em>Element selector logic no more working -</em>  I am not sure whether there could be some more codes which are not working. Taking the example of <strong>Update 4</strong>, when the position of the input is <code>#60table &gt; div &gt; input</code>, was it not correct to select like <code>$("#60table INPUT[type='checkbox']")</code>. If so, are there some other common mistakes which could be there in my project which might have broken.  </p></li>
  <li><p><em>Better explanation of where all to replace attr with prop -</em> I need a more clear distinction between when to use prop instead of attr, with some more examples. As per Jon's answer - </p></li>
  </ul>
  
  <blockquote>
    <p>If it directly affects the behavior or state of the UI widget use
    prop; otherwise use attr.</p>
  </blockquote>
  
  <p>Where can I get some kind of a list of attributes which directly affect some property of the UI widget</p>