My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Document  
Updated Apr 5, 2008 by chris4...@gmail.com

#plugin document of jQuery-selectbox-utils

methods

numericOptions method

code example

$('#month').numericOptions({from:1,to:12,selectedIndex:5,namePadding:2,valuePadding:2});

config parameters

  • remove : true/false . delete exist option tags or not. (default true)
  • from : start number. (default 1)
  • to : end number (default 31)
  • selectIndex : selected index number (default 0)
  • namePadding : padding 0 length for name. (default 0)
  • valuePadding : padding 0 length for value. (default 0)
  • labels : set not numeric labels (default null)(ex.['Jan','Feb','Mar','Apl','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'])
  • exclude : set exclude values (default null)(ex.[2,3,6])
  • startLabel : set first option tag (label and value) (ex.['select month',''])

datePulldown method

code example

$('#year1').numericOptions({from:2007,to:2011});
$('#month1').numericOptions({from:1,to:12});
$('#date1').numericOptions().datePulldown({year:$('#year1'),month:$('#month1')});

config parameters

  • year : jQuery object of year value. (mandatory)
  • month : jQuery object of month value. (mandatory)

options method

code example

//getter
$('#test1').options();
//setter
var op = [['dog','1'],['cat','2'],['bird','3']];
$('#test3').options(op);

config parameters

  • option array : label and value array (default null)
Comment by michi.po...@gmail.com, Nov 23, 2010

It's not "selectIndex". You need to use "selectedIndex"

For example: $(this.viewSelector+" "+this.daySelector).numericOptions({selectedIndex: day}).datePulldown({year: $(this.viewSelector+" "+this.yearSelector), month: $(this.viewSelector+" "+this.monthSelector)});


Sign in to add a comment
Powered by Google Project Hosting