aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCa-Phun Ung <pazu2k@gmail.com>2008-10-05 10:44:15 +0000
committerCa-Phun Ung <pazu2k@gmail.com>2008-10-05 10:44:15 +0000
commit993bb9adfddd542374bded7a737e3b437f39ec28 (patch)
treec8d52cf9f32162bdc032de747b92d2f5682f0319
parentbf66a8e140929466173932d345f85716b3298ad1 (diff)
downloadjquery-ui-993bb9adfddd542374bded7a737e3b437f39ec28.tar.gz
jquery-ui-993bb9adfddd542374bded7a737e3b437f39ec28.zip
Spinner: spinner casing now sets itself a unique id based on the id of the original input textbox. If no id exists in the original then no id is set to the casing.
-rw-r--r--ui/ui.spinner.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/ui.spinner.js b/ui/ui.spinner.js
index d0069b177..71da1d15b 100644
--- a/ui/ui.spinner.js
+++ b/ui/ui.spinner.js
@@ -138,6 +138,14 @@ $.widget('ui.spinner', {
})
.end();
+ // Give the spinner casing a unique id only if one exists in original input
+ // - this should aid targetted customisations if a page contains multiple instances
+ this.element.attr('id', function(){
+ if (this.id) {
+ $(this).parent().attr('id', this.id+'-ui-spinner');
+ }
+ });
+
// DataList: Set contraints for object length and step size.
// Manipulate height of spinner.
this._items = this.element.children().length;