title: How to convert a Title to a URL slug in jQuery?
body: <p>I'm working on an app in CodeIgniter, and I'm trying to make a field on a form dynamically generate the <strong>URL slug</strong>. What I'd like to do is remove the punctuation, convert it to lowercase, and replace the spaces with hyphens. So for example, Shane's Rib Shack would become shanes-rib-shack.</p>
  <p>Here's what I have so far. The lowercase part was easy, but the replace doesn't seem to be working at all, and I have no idea to remove the punctuation:</p>
  <pre><code>$(&quot;#Restaurant_Name&quot;).keyup(function() {
    var Text = $(this).val();
    Text = Text.toLowerCase();
    Text = Text.replace('/\s/g','-');
    $(&quot;#Restaurant_Slug&quot;).val(Text);  
  });
  </code></pre>