0

On jquery mobile, how can I auto open the select box when page loads? Like in this sample: open select box on page load

My code:

    <div data-role="fieldcontain">
        <fieldset data-role="controlgroup" data-type="horizontal">
            <select name="select-choice-usa" id="select-choice-usa" size="15">
                <option>USA</option>
                <option selected="selected">EUROPE</option>
                <option>UK</option>
            </select>

            <select name="select-choice-size" id="select-choice-size">
                <option selected="selected">3.5</option>
                <option>4</option>
                <option>4.5</option>
            </select>
        </fieldset>
    </div>

The script I tried:

$('#page1').live("pagecreate", function() {
    $('#select-choice-usa').attr('parent',focus())
});
mr2ert
  • 5,146
  • 1
  • 21
  • 32
ofir
  • 129
  • 1
  • 4
  • 12

1 Answers1

0

Short answer, it can't be done: Show select dropdown in jQuery?.

You can implement your own selectbox but that's about it.

Community
  • 1
  • 1
Gajotres
  • 57,309
  • 16
  • 102
  • 130