title: is it possible to set custom attribute by jQuery attr() function using JS variables
body: <p>I'm using jquery 1.5 and html4 standard.<br>
   I'm trying to set custom attribute which i get by javascript variable, but it is not setting up.code sample:</p>
  
  <pre><code>var attname="list1"; // this is changed on every call of the function where it is defined.    
  var attvalue="b,c,d"; // this also changed.  
  jQuery('#div1').attr({attname:attvalue});
  </code></pre>
  
  <p>but it treat attname as string itself rather variable.
  there are other option like using data(),prop() but they are supported in HTML5 and jquery 1.6 that is not possible for me at the moment.other problem is data can't be set on server side to be sync and used at client side by jquery data(). as they are syntactically diff. 
  if there's some other way please suggest
  Thanks.</p>