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 6345219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:46:48+00:00 2026-05-24T20:46:48+00:00

My goal: In case someone selects a specific value from an select box something

  • 0

My goal: In case someone selects a specific value from an select box something is supposed to happen.

My environment:

  • Jquery: 1.62
  • Jquery Mobile: 1.0b
  • iOS: 4.3.5

I am binding the event handler to the select box by

$( "#location" ).bind( "change", function(event, ui) {
   alert("foo");
});

The code works without jquery mobile. Is it a bug or not the right approach for event binding in Jquery Mobile?

Pls find below the complete code example.

<!doctype html>
<head>
    <meta charset="utf-8">
    <title>Demo</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" />
    <script src="http://code.jquery.com/jquery-1.6.2.min.js" type="text/javascript">
    </script>
    <script src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js" type="text/javascript"></script>
    <script>
       $(document).ready(function() 
       {                  
            $( "#location" ).bind( "change", function(event, ui) {
             alert("foo");
             });
      }); 
    </script>
    <link rel="stylesheet" href="css/theme-i.css">
    <link rel="stylesheet" href="css/app.css">
</head>
<body>
   <div id="container">
       <form>             
            <div data-role="page">
                        <select name="location" id="location" >
                            <option value="1">Option1</option>
                            <option value="2">Option2</option>

                        </select>
               </div> <!-- /page -->
        </form>                               
    </div><!-- /container  -->
</body>
</html>
  • 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-05-24T20:46:49+00:00Added an answer on May 24, 2026 at 8:46 pm

    I think your markup is a little out of order, Here is a live exmaple:

    • http://jsfiddle.net/phillpafford/PdkQ5/
    • http://jsfiddle.net/phillpafford/PdkQ5/5/ (with page navigation)

    JS:

    $("#location").change(function() {
        alert('Location Changed value: '+$('#location option:selected').val()+' text: '+$('#location option:selected').text());
    });
    

    HTML:

    <div data-role="page" id="home">
       <div id="container">
            <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="f"> 
                <li data-role="list-divider">Navigation</li> 
                <li><a href="#locationPage">Location Page</a></li> 
            </ul>                               
        </div>
    </div>
    
    <div data-role="page" id="locationPage">
       <div id="container">
           <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="f"> 
                <li data-role="list-divider">Navigation</li> 
                <li><a href="#home">Home Page</a></li> 
            </ul>
           <br />
           <form action="#" id="theForm" method="get">                         
                <select name="location" id="location" >
                    <option value="1">Option1</option>
                    <option value="2">Option2</option>
                </select>              
            </form>                               
        </div>
    </div> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to maintain a web file server separately from my main ASP.NET
The goal: To create a .NET dll i can reference from inside SQL Server
I essentially have the same goal as in this question: Calling a jQuery plugin
Using javascript, can someone please help me with a pattern to match something in
Goal My goal to better understand how concurrency within Java EE environment and how
My goal is to simply use a pop-up box to ask the user for
in scala i need to implement something similar to python metaclasses. in my case
The following query works properly to pull company names from one table into jquery
My program's goal is to receive from the standard input a text, and a
Goal: I'd like to allow users to create questions and collect information from other

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.