Return to Snippet

Revision: 13849
at May 7, 2009 20:33 by xtheonex


Initial Code
$('#permalink').val($(this).val().replace(/\s/g, '-').replace(/[^\w/-]/g, '').toLowerCase());

Initial URL

                                

Initial Description
A lovely little one liner that strips out all non alphanumeric chars first, then replaces the spaces with hyphens, then converts all to lowercase :D

Initial Title
Javascript/jQuery permalink converter...

Initial Tags
javascript, jquery

Initial Language
JavaScript