Just another another (another) url slug creation plugin for jQuery.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
libs Initial May 14, 2013
src fix #15, empty targets cannot be locked Oct 6, 2017
test fix #15, empty targets cannot be locked Oct 6, 2017
.gitignore Bump Speakingurl, new Version Jul 29, 2015
.jshintrc Release 1.2.1 Aug 2, 2015
.travis.yml Fixed Travis :S Dec 29, 2014
CONTRIBUTING.md
Gruntfile.js fix grid Oct 6, 2017
LICENSE-MIT fix #15, empty targets cannot be locked Oct 6, 2017
README.md
bower.json Bump speakingurl version Jun 13, 2016
package.json Merge pull request #18 from madflow/bump_speaking_url Oct 8, 2017

README.md

Build Status

jQuery Slugify

Just another another (another) url slug creation plugin for jQuery.

Getting Started

You can install the plugin using Bower:

bower install jquery-slugify

You can install the plugin using NPM:

npm install jquery-slugify --save

You can install the plugin using YARN:

yarn add jquery-slugify    

You can download the production version or the development version.

The plugin depends on speakingurl.

In your web page:

<script src="jquery.js"></script>
<script src="speakingurl.min.js"></script>
<script src="slugify.min.js"></script>

<input type ="text" value="" id="slug-source" /> <!-- The text to be slugged -->
<input type ="text" value="" id="slug-target" /> <!-- The processed text as slug -->

<script>
jQuery(function($) {
  $.slugify("Ätschi Bätschi"); // "aetschi-baetschi"
  $('#slug-target').slugify('#slug-source'); // Type as you slug

  $("#slug-target").slugify("#slug-source", {
  	separator: '_' // If you want to change separator from hyphen (-) to underscore (_).
  });
});
</script>