mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
add customSelect
This commit is contained in:
16
jquery.customSelect/jquery.customSelect-tests.ts
Normal file
16
jquery.customSelect/jquery.customSelect-tests.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
/// <reference path="../jquery/jquery.d.ts" />
|
||||
/// <reference path="jquery.customSelect.d.ts" />
|
||||
|
||||
class CustomSelectOptions implements JQueryCustomSelectOption {
|
||||
"customClass": string;
|
||||
"mapClass": boolean;
|
||||
"mapStyle": boolean;
|
||||
}
|
||||
|
||||
var customSelectOptions = new CustomSelectOptions();
|
||||
|
||||
customSelectOptions.customClass = "myOwnClassName";
|
||||
customSelectOptions.mapClass = true;
|
||||
customSelectOptions.mapStyle = true;
|
||||
|
||||
$('select').customSelect(customSelectOptions);
|
||||
16
jquery.customSelect/jquery.customSelect.d.ts
vendored
Normal file
16
jquery.customSelect/jquery.customSelect.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Type definitions for jquery.customSelect.js 0.5.1
|
||||
// Project: http://adam.co/lab/jquery/customselect//
|
||||
// Definitions by: adamcoulombe <https://github.com/adamcoulombe>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
///<reference path="../jquery/jquery.d.ts" />
|
||||
|
||||
interface JQueryCustomSelectOption {
|
||||
customClass?: string;
|
||||
mapClass?: boolean;
|
||||
mapStyle?: boolean;
|
||||
}
|
||||
|
||||
interface JQuery {
|
||||
customSelect(val:JQueryCustomSelectOption): JQuery;
|
||||
}
|
||||
Reference in New Issue
Block a user