Multiple custom file input fields with jQuery
You could certainly combine the first 3 handlers into 1, since they do the exact same thing:

$(document).on('change', ':file', function () {
  var input = $(this),
      filename = input.val().replace(/\\/g, '/').replace(/.*\//, '');
  input.trigger('fileselect', [filename]);
});


That'll add an event handler to all file inputs on the page.

You can simplify the replace stuff a bit; there's no need to make backslashes into regular slashes, if you're just going to throw it all away afterward. So it'd be simpler to say 

input.val().replace(/^.*[\\\/]/g, '')


i.e. remove everything up-to-and-including the last slash.

Handling the custom fileselect event is where you want to limit it to specific inputs. However, you can extract the truncate logic, to clean things up, and avoid the repetition.

function truncateFilename (filename) {
  if(filename.length &gt; 14) {
    return filename.substring(0, 14) + "...";
  }
  return filename;
}


And since you've stuck to a naming convention for the elements you want to display the filenames, you can create a function to set up your event handling:

function addFileSelectHandler(inputClass) {
  $(inputClass).on("fileselect", function (event, filename) {
    $(inputClass + "-name").text(truncateFilename(filename));
  });
}

addFileSelectHandler(".compliance-guide");
addFileSelectHandler(".compliance-other");
addFileSelectHandler(".agreement-file");


Other notes:


Don't use .html() when you're just setting plain text strings; use .text() (as seen above)
Don't use classes to identify unique elements; use IDs. It's what they're for.
CSS has a text-overflow rule that'll auto-truncate text if it overflows - no need for JavaScript at all, and no need for a hard-coded length of 14. As always, letter-count has little to do with how much space it takes to display; "m"s take up a lot more space than "i"s (if you're using a non-monospaced font).


Also, you could choose to handle all of this in the generic $(:file).on("change",.. function. Instead of using specific classes on the elements that should show a filename, you could use a data-input attribute to link them to a file input.

For instance, you could have this markup:

&lt;input type="file" id="some-file"&gt;
&lt;span class="filename" data-input="some-file"&gt;&lt;/span&gt;

&lt;input type="file" id="some-other-file"&gt;
&lt;span class="filename" data-input="some-other-file"&gt;&lt;/span&gt;


And this JS:

$(document).on('change', ':file', function () {
  var input = $(this),
      filename = input.val().replace(/^.*[\\\/]/g, '');

  $(".filename[data-input='" + this.id + "']").text(filename);

  // you can still trigger your custom event, if you want
  // input.trigger('fileselect', [filename]);
});


That'll automatically show the filename, provided there's an element to show it. If there's no element, well, then it's not shown.