Skip to content

Instantly share code, notes, and snippets.

@jathayde
Created January 2, 2012 16:52
Show Gist options
  • Save jathayde/1551351 to your computer and use it in GitHub Desktop.
Save jathayde/1551351 to your computer and use it in GitHub Desktop.
<script>
$(function() {
$('input#feature_headline').change(function () {
alert('foo');
var str = "";
str = $(this).text();
str = str.toLowerCase().replace(/ /g, '-');
$('input[name="feature[slug]"]').val(str);
})
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment