title: Jquery hide div and input by id
body: <p>I need to hide a div and 2 input fields, I know how to do this by using the ID and NAME but the code adds a unqiue number to the end of the ID name.  See Below.</p>
  
  <pre><code>&lt;div id="gift-messages-for-item-container-295"&gt;Gift Message&lt;/div&gt;
  </code></pre>
  
  <p>Below is also the INPUT I need to hide, same as before it adds the unique number to the ID and NAME.</p>
  
  <pre><code>&lt;input type="text" name="giftmessage[295][from]" id="gift-message-295-from" title="From" value="sadf sadf" class="input-text"&gt;
  </code></pre>
  
  <p>If another user loads the page it will change the 295 number.  Does anyone know how I can hide the DIV and INPUT everytime a new number gets added to the end of the ID and NAME?</p>
  
  <p>Cheers</p>
  
  <p>EDIT:</p>
  
  <p>Thanks for all the help, I couldnt get the JQuery working the platform I am using in Magento so I can change the base code.  I have now got it working using CSS.  </p>
  
  <p>[id^="gift-messages-for-item-container-"] p {
     display: none;
  }
  input[name^=giftmessage] {display: none;}</p>