title: Using JQuery to change element ID
body: <p>I've been trying to change an element ID using jquery for an A/B test.</p>
  
  <p>From what ive seen, it should go something like this:</p>
  
  <p><code>$('#tag').attr('oldId','newId');</code></p>
  
  <p>But so far, no dice - any ideas?</p>
  
  <p>*I've looked through the responses and i think i had the wrong end of the stick! I was assuming the current / old id had to be placed where ive labelled 'oldId', rather than id, followed by the replacement - silly mistake, thanks for all the help :)</p>