title: how to set attribute value of div tag through ajax jquery
body: <p>I want to set value of attribute 'data-rating'. It will use Ajax. </p>
  
  <pre><code>&lt;div id="fixed_&lt;s:property value="messageId"/&gt;" **data-rating=**"&lt;%=averageScore%&gt;"&gt;&lt;/div&gt; from ajax function though jquery that is as below :
  
  `
  
  $.ajax({
  type : "POST",
  cache:false,
  url : '&lt;s:url action="ratingStatus"/&gt;',
  dataType: "text",
  data : 'score=' +score+'&amp;messageId='+&lt;s:property value="messageId"/&gt;+'&amp;categoryId='+&lt;s:property value="categoryId"/&gt;+'&amp;threadId='+&lt;s:property value="threadId"/&gt;,
  success : function(data) {
  alert("inside Success...");
  
  //here i want to set div attribute(data-rating) value from action class response that i have made...
  
  
  
  //location.reload();
  
  }
  });`
  </code></pre>
  
  <p>Please help me if any one can....</p>