Shorten Filepath Plugin

A jQuery plugin to shorten filepaths.

Usage

$(".filepath").filepaths();

Will shorten file paths and put the complete filepath in the title of the element. So if you hover over the element you can see the full path.

On resize of your browser if using percentages on your element the file path will grow and shrink, to either show or hide more of the filepath.

Example

$(".filepath").filepaths({ begin : 18, end : 10 });
filepath plugin version 1.0 https://yoursite.com/foldername/docs/downloads/folder.zip

Options

begin Number of characters to always show at the beginning of the filepath (default: 13)
end Minimum Number of characters to always show at the end of the filepath (default: 5)

Download

aw20.filepath.js.zip

Installation

The jQuery library should already be imported on the page (developed with 1.6.4).

The following files must also be imported on the page:

  • aw20.filepaths.min.js
  • the plugin workings (minified)

Quicklinks