1

I couldn't find in the mobi doc how to set auto wheel scroll on load. I have 2 custom wheels like this:

var whl1 = {'1_Value1':'1_Value1',
            '1_Value2':'1_Value2', 
            '1_Value3':'1_Value3',
            '1_Value4':'1_Value4', 
            '1_Value5':'1_Value5', 
            '1_Value6':'1_Value6',
            '1_Value7':'1_Value7'};

var whl2 = {'2_Value1':'2_Value1',
            '2_Value2':'2_Value2', 
            '2_Value3':'2_Value3',
            '2_Value4':'2_Value4', 
            '2_Value5':'2_Value5'};

I want '1_Value4' from the first wheel and '2_Value5' from the second wheel to be the default value on load.

Here is a jsFiddle for test - http://jsfiddle.net/3bScd/225/

Any help would be greatly appreciated :)

Newbie
  • 152
  • 2
  • 13

1 Answers1

1

I found the answer myself. Have to use setValue and pass it an array.

 $('#i').scroller('setValue', ['1_Value4','2_Value5'])  

JSFiddle - http://jsfiddle.net/3bScd/226/

Newbie
  • 152
  • 2
  • 13