Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript - How to convert a Title to a URL slug in jQuery?

function convertToSlug(Text) {
  return Text.toLowerCase()
             .replace(/ /g, '-')
             .replace(/[^w-]+/g, '');
}
Source by worcraft-algeria-dz.com #
 
PREVIOUS NEXT
Tagged: #javascript #How #convert #Title #URL #slug
ADD COMMENT
Topic
Name
8+7 =