From db5ca82c656ecf4024a669b41e428cc872045a01 Mon Sep 17 00:00:00 2001 From: tomato360 Date: Fri, 5 Sep 2014 17:13:53 +0900 Subject: [PATCH] add customSelect --- CONTRIBUTORS.md | 1 + jquery.customSelect/jquery.customSelect-tests.ts | 16 ++++++++++++++++ jquery.customSelect/jquery.customSelect.d.ts | 16 ++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 jquery.customSelect/jquery.customSelect-tests.ts create mode 100644 jquery.customSelect/jquery.customSelect.d.ts diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index afc287da3c..6768db043f 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -161,6 +161,7 @@ All definitions files include a header with the author and editors, so at some p * [jQuery.Colorbox](http://www.jacklmoore.com/colorbox/) (by [Gidon Junge](https://github.com/gjunge)) * [jQuery.contextMenu](http://medialize.github.com/jQuery-contextMenu/) (by [Natan Vivo](https://github.com/nvivo/)) * [jQuery.Cookie](https://github.com/carhartl/jquery-cookie) (by [Roy Goode](https://github.com/RoyGoode)) +* [jQuery.customSelect](https://github.com/adamcoulombe/jquery.customSelect) (by [tomato360](https://github.com/tomato360)) * [jQuery.Cycle](http://jquery.malsup.com/cycle/) (by [François Guillot](http://fguillot.developpez.com/)) * [jQuery.Cycle2](http://jquery.malsup.com/cycle2/) (by [Donny Nadolny](https://github.com/dnadolny)) * [jQuery.dataTables](http://www.datatables.net) (by [Armin Sander](https://github.com/pragmatrix)) diff --git a/jquery.customSelect/jquery.customSelect-tests.ts b/jquery.customSelect/jquery.customSelect-tests.ts new file mode 100644 index 0000000000..ad2fb30192 --- /dev/null +++ b/jquery.customSelect/jquery.customSelect-tests.ts @@ -0,0 +1,16 @@ +/// +/// + +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); diff --git a/jquery.customSelect/jquery.customSelect.d.ts b/jquery.customSelect/jquery.customSelect.d.ts new file mode 100644 index 0000000000..2abe441a27 --- /dev/null +++ b/jquery.customSelect/jquery.customSelect.d.ts @@ -0,0 +1,16 @@ +// Type definitions for jquery.customSelect.js 0.5.1 +// Project: http://adam.co/lab/jquery/customselect// +// Definitions by: adamcoulombe +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +interface JQueryCustomSelectOption { + customClass?: string; + mapClass?: boolean; + mapStyle?: boolean; +} + +interface JQuery { + customSelect(val:JQueryCustomSelectOption): JQuery; +} \ No newline at end of file