title: How to convert radio buttons to select in jquery
body: <p>I need to convert radio buttons to select boxes in jquery.</p>
  
  <p>I have the following code, but it doesn't produce what I need:</p>
  
  <pre><code>$j('#product_addtocart_form input[type=radio]').each(function(i, checkbox){
  var $checkbox = $j(checkbox);
  // create a select
  var $select = $j('&lt;select&gt;&lt;/select&gt;');
  // set name and value
  $select.attr('name', $checkbox.attr('name')).attr('value', $checkbox.val());
  $select.append(new Option('test','tet'));
  //$checkbox.remove();
  });
  </code></pre>