var PS_ALLOW_ACCENTED_CHARS_URL = 0; $(document).ready(function() { $('#title_' + id_language).keyup( function( event ) { $('#slug_' + id_language).val(str2url($('#title_' + id_language).val(), 'UTF-8')); }); });