Text to Slug is a neat and small jquery plugin for making slugable input in a form
Get Start
Requires : JQuery
Add jquery and Text to slug js to document
<script src="src/jquery.min.js"></script>
<script src="src/text2slug.js"></script>
Demo #1 - Easy Start!
$(function(){
$('#slug_tmp').text2slug();
});
Demo #2 - Change hidden input name
$(function(){
$('#slug_tmp2').text2slug({input_name:'slug2'});
});
Demo #3 - Change Input Color
$(function(){
$('#slug_tmp3').text2slug({slug_color:'#DD094C'});
});
Demo #3 - Change Separator
text to Slug Plugin uses hyphen (dash) as separator in output . You can Change It Now !
For Example separate charachters with "#" instead of "-"
$(function(){
$('#slug_tmp4').text2slug({separator:'#'});
});