title: Using sprintf in jQuery
body: <p>How can I use sprintf in jQuery?</p>
  
  <p>I'm trying to add an <code>id</code> to a chunk of HTML that is returned from a script</p>
  
  <p>So:</p>
  
  <pre><code>success: function(html){
      $('.data').html($.sprintf(html,'TEST'));
  },
  </code></pre>
  
  <p>The HTML that is returned is a large chunk of HTML where i've added a <code>%s</code> for sprintf to do it's replacement.</p>
  
  <p>Eg: <code>'&lt;div&gt;Welcome to Blah&lt;/div&gt;&lt;div&gt;You userId is %s&lt;/div&gt;'</code></p>