From dcb341e7f8a5ddc3dc94b00f9d9fc7e3867958b3 Mon Sep 17 00:00:00 2001 From: Ca-Phun Ung Date: Sat, 20 Sep 2008 19:04:01 +0000 Subject: Spinner: new options: format, items & decimals (r728). items: accepts a array of objects which will be converted to a list of items by the spinner. format: printf style formatting of each item - accepts named arguments. --- tests/visual/spinner.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests/visual') diff --git a/tests/visual/spinner.html b/tests/visual/spinner.html index de05b6d25..f5b441e26 100644 --- a/tests/visual/spinner.html +++ b/tests/visual/spinner.html @@ -32,11 +32,19 @@ $(function(){ 's3': {currency: '$'}, 's4': {}, 's5': { + // + // Two methods of adding external items to the spinner + // + // method 1: on initalisation call the add method directly and format html manually init: function(ui) { for (var i=0; i»'); + ui.add(''+ itemList[i].title +''); } - } + }, + + // method 2: use the format and items options in combination + format: '%(title) »', + items: itemList } }; -- cgit v1.2.3