var input = $(".js-slug-field");
input.each(function (k,v) {
    $(v).keyup(function () {
        var value = $(this).val();
        value = getSlug(value);
        var target = $(v).data('slug-field');
        $('input[data-slug-target='+target).val(value);
    })
});