Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8258381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:31:12+00:00 2026-06-08T02:31:12+00:00

I make use of Mobiscroll jQuery script for a prettier input by the users.

  • 0

I make use of Mobiscroll jQuery script for a prettier input by the users. On page load, the first option of the select list is shown as selected. What should I add to the existing code that on page entrance, the (for example) 3rd value is shown as the default?

I tried selecte="selected" but it does not work.

this is the jQuery script

$(function(){
    $('#city').scroller({
        preset: 'select',
        theme: 'android-ics',
        display: 'inline',
        mode: 'scroller',
    });
});

and here is the options of the select box

<select id="city" class="cities" data-role="none" name="City">
<option value="">All</option>
<option value="1">Atlanta</option>
<option value="2">Berlin</option>
<option value="3">Boston</option>
</select>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:31:13+00:00Added an answer on June 8, 2026 at 2:31 am

    You can easily set the value from jQuery by doing this:

    var defaultValue = 3;
    $("#city").val(defaultValue);​
    

    “3” here represents Boston from your drop down list, here’s a fiddle for proof:

    http://jsfiddle.net/6mj8n/5/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use to make use of wildcards in a Makefile in order to select
I make use of class selectors in JQuery and this works fine but in
Can IIS / ASP.NET make use of the TCP keepalive option to detect dead
Does IIS / ASP.NET make use of TCP keepalive option? What are the config
I am trying to make use of qTip JQuery plugin . I have tried
I'm trying to make use of UNIX attributes in Active Directory while creating users
I know i can make use of sort() function in Groovy to sort List.
I'm trying to make use of a dictionary plist as shown below: I read
I am trying to make use of JQuery and Fancybox. This is how it
I'm trying to make use of the results attribute of HTML5 <input type=search> tags

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.