Skip to content

Commit 7137205

Browse files
committed
Merge pull request DefinitelyTyped#4455 from EnableSoftware/jquery-placeholder
Added overload for definition of a custom CSS class
2 parents 264d1a4 + 767f577 commit 7137205

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

jquery.placeholder/jquery.placeholder-tests.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
/// <reference path="jquery.placeholder.d.ts"/>
33

44
$('input').placeholder();
5+
6+
// specify custom class
7+
$('input').placeholder({ customClass: 'my-placeholder' });
8+
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
// Type definitions for jquery.placeholder.js 2.0.7
1+
// Type definitions for jquery.placeholder.js 2.1.1
22
// Project: https://github.com/mathiasbynens/jquery-placeholder
3-
// Definitions by: Peter Gill <https://github.com/majorsilence>
3+
// Definitions by: Peter Gill <https://github.com/majorsilence>, Neil Culver <https://github.com/EnableSoftware>
44
// Definitions: https://github.com/borisyankov/DefinitelyTyped
55

66
/// <reference path="../jquery/jquery.d.ts"/>
77

88
interface JQuery {
9-
10-
placeholder() : void;
11-
9+
placeholder(options: { customClass: string }) : JQuery
10+
placeholder() : JQuery
1211
}
1312

0 commit comments

Comments
 (0)