title: Cannot read the good value from element with jquery
body: <p>I'm facing the following problem. (I volontary simplify the code in order to facilitate my explanation), The answer of my question is probably related to the way the DOM is updated.</p>
  
  <p>I display a web page where I have the following DIV</p>
  
  <pre><code>&lt;div id="dataComment16" data-url="/blog/index.php/post/comment?post_id=16" 
              data-param="0" &gt;&lt;/div&gt;
  </code></pre>
  
  <p>in my js script, I update the data-param in the following way</p>
  
  <p><code>$('#dataComment16').attr('data-param',250);</code>     -- update data-param   </p>
  
  <p>but If I want to display data-param just after  updating, </p>
  
  <p>the command <code>alert ($('#dataComment16').attr('data-param'));</code>  still display 0</p>
  
  <p>when I check the DOM with firefox  the DIV contains the following</p>
  
  <pre><code>&lt;div id="dataComment16" data-url="/blog/index.php/contest/comment?post_id=16" 
                  data-param="250" &gt;&lt;/div&gt;
  </code></pre>
  
  <p>but if I display the html source,  I still have  data-param=0</p>
  
  <pre><code>&lt;div id="dataComment16" data-url="/blog/index.php/post/comment?post_id=16" 
                  data-param="0" &gt;&lt;/div&gt;
  </code></pre>
  
  <p>My question is how can I do  to get the new data-param value?  (I'm using ajax)</p>
  
  <p>Do I have to read the 'cache' instead of the page ?  and how can I do it ?</p>
  
  <p>Any insights will be appreciated</p>