Skip to content

Commit

Permalink
Ignore the last commit, this one is better
Browse files Browse the repository at this point in the history
  • Loading branch information
joemsak committed Jul 23, 2010
1 parent f190df1 commit f5edaa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/admin/blogs/_form.html.erb
Expand Up @@ -95,9 +95,9 @@
}, 250);
});

$('#blog_title').keyup(function(){
slug = $(this).val().replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').replace(/-{2,}/,'-').toLowerCase();
$('#blog_permalink').val(slug);
$('#blog_title').bind('keyup paste blur', function(){
slug = $(this).val().replace(/\s+/g,'-').replace(/[^a-zA-Z0-9\-]/g,'').toLowerCase();
$('#blog_permalink').val(slug.replace(/\-{2,}/, '-'));
})
});
</script>
Expand Down

0 comments on commit f5edaa6

Please sign in to comment.