mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-14 12:09:04 +08:00
Renamed files to match Bower package name: - `jquery.succinct/jquery.succinct-tests.ts` to `succinct/succinct-tests.ts` - `jquery.succinct/jquery.succinct.d.ts` to `succinct/succinct.d.ts`
31 lines
556 B
TypeScript
31 lines
556 B
TypeScript
/// <reference path="succinct.d.ts" />
|
|
|
|
// Call with no arguments (accepting defaults)
|
|
$(".truncate").succinct();
|
|
|
|
// Specify size
|
|
$(".truncate").succinct({
|
|
size: 120
|
|
});
|
|
|
|
// Specify ellipsis replacement
|
|
$(".truncate").succinct({
|
|
omission: "→"
|
|
});
|
|
|
|
// Specify flag to leave trailing special characters
|
|
$(".truncate").succinct({
|
|
ignore: false
|
|
});
|
|
|
|
// Combine options
|
|
$(".truncate").succinct({
|
|
size: 120,
|
|
omission: '...',
|
|
ignore: false
|
|
});
|
|
|
|
// Can chain jQuery methods
|
|
$(".truncate")
|
|
.succinct()
|
|
.removeClass("truncate"); |