title: jquery selector not working with [ ]
body: <p>I'm using jQuery to manipulate form data in an osCommerce instance and I'm having trouble selecting some elements.</p>
  
  <p>The script generates textareas with the id product_description[N], N being the 1, 2, 3... </p>
  
  <p>The problem is that having an id value with [] in it makes jQuery (even regular script) not to select the element and I can't work with it.</p>
  
  <p>I tried switching the id to underscores, manipulate the information and then change it back to [ ] but I can't even do:</p>
  
  <pre><code>$('#product_description[1]').attr('id','products_description_1');
  </code></pre>
  
  <p>Is there a way to make jQuery to select something like this $('#some[2]').function... ?</p>
  
  <p>If not, If there's another way I can change the ID value then it's ok because I can work as usually and then change it back to the [ ] for the php to recognize that field</p>
  
  <p>Yes, I know, I can select the textarea in another way like by class, but as there are many texareas in te page, I need a unique name and that would requiere editing osCommerce script which I don't want. I plan to contribute my JS to the oscommerce community and for another person to just add a .js is easy, but if they have to edit a php file for the javascript to work it could be either too scary for a newbie or impossible for somebody that already edited it.</p>
  
  <p>Thanks a lot</p>