title: jQuery. Element width depending on its parent width
body: <p>I have a pixel-sized table which cells' width depends on the content. There are input elements in the first row of the table and I need them to have the same width as they parents (). The idea is that those inputs' width should be calculated automatically and set in pixels with jQuery. There are no classes nor id's for those cells and inputs. I'm able to set the width for one cell only using selectors with code like this:</p>
  
  <pre><code>var parentWidth = $(".foo").width();
  $('td.foo input').width(parentWidth);
  </code></pre>
  
  <p>But as I said I need it to be more universal without using any classes etc.
  Can anyone help me with that? Thank you!</p>