Generating User-friendly URL Slugs With jQuery - friendurl

Generating User-friendly URL Slugs With jQuery - friendurl
File Size: 6.99 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Yet another jQuery plugin that helps you generate user- and seo-friendly URL slugs from any strings, with transliterate and custom divider support.

How to use it:

1. Put jQuery JavaScript library and the jQuery friendurl plugin at the bottom of the webpage.

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="jquery.friendurl.js"></script>

2. Create a normal input field that will accept the user typed strings like post titles.

<input type="text" name="title" id="title">

3. Create another input field that will output the url slug generated by the plugin.

<input type="text" name="output" id="output" readonly>

4. Active the plugin as this:

$('#title').friendurl({
  id : 'output'
});

5. Customize the divider.

$('#title').friendurl({
  id : 'output',
  divider: '_'
});

6. Enable the transliterate mode.

$('#title').friendurl({
  id : 'output',
  divider: '_',
  transliterate: true
});

Changelog:

2018-08-10


This awesome jQuery plugin is developed by riverside. For more Advanced Usages, please check the demo page or visit the official website.