English 中文(简体)
Can t 获得方言,在吉克里流动
原标题:Can t get dialog to open in Jquery mobile

在选择适当价值时,我想在示范方言中用id=“new_firm”打开四肢。 我可以开辩。 我知道,自警报爆发以来,这本书已经执行。 谁能告诉我,这里有什么错误?

<!DOCTYPE html>
<html>
<head>
    <title>FileReader Example</title>

    <link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.0.css" />
    <script type="text/javascript" charset="utf-8" src="js/jquery-1.7.1.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.0.js"></script>
    <script type="text/javascript" charset="utf-8" src="js/phonegap-1.3.0.js"></script>
    <script type="text/javascript" charset="utf-8">

        function openNewFirmDialog() {
            var selected = $("#select_firm option:selected");
            var ddValue = selected.text();
            if(ddValue === "Add a new company") {
                //alert(ddValue);
                $( #new_firm ).dialog({modal:true});
            }

        }

    </script>

</head>
<body>
    <div data-role="page" id="add_details">

        <div data-role="content">
            <h2>Register hours</h2>

            <a href="#new_firm" data-rel="dialog">hei</a>

            <div data-role="fieldcontain">
                <select id="select_firm" data-native-menu="false" onchange="openNewFirmDialog()">
                <label for="select_firm"  class="select">Select firm:</label>
                <option data-placeholder="firm">Firm</option>
                <option value="internal">Internal</option>
                    <option value="new_firm_option">Add a new company</option>
                </select>
            </div>

            <input type="text" id="descritptionTxt" value="Description"/>
            <div data-role="controllgroup" data-type="horizontal">
                <input type="range" id="number_of_hours" min="0" max="24" step="0.25" value="0" />
                <input type="range" id="number_of_minutes" min="0" max="24" step="0.25" value="0" />
            </div>


        </div>

        <div data-role="footer" data-position="fixed">
            <div data-role="navbar">
                <ul>
                    <li><a href="index.html" data-icon="home">Overview</a></li>
                    <li><a href="add.html" data-icon="plus">Add hours</a> </li>
                    <li><a href="settings.html" data-icon="gear">Settings</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div data-role="page" id="new_firm">
        <h2>Add a new firm</h2>
        <textarea id="the_new_firm" value="New firm"/>
    </div>

</body>

问题回答

我认为,如果你想使用方言的话,你需要补充提及 j。 http://jqueryui.com/demos/dialog/“rel=“nofollow”http://jqueryui.com/demos/dialog/





相关问题
How can I pass an element to a jQuery UI dialog box?

Goal I ve got a web page with a table of items. Each item has a delete button beside it. When that button is clicked, I want to Ask the user to confirm Delete the corresponding item from the ...

jQuery UI Dialog OnBeforeUnload

I have a small problem. I m attempting to catch the OnUnLoad Event of the Window and ask a confirmation question and if the user decides they want to stay then fine, and if they want to leave the ...

jQuery UI dialog dynamic height and width

I m using jQuery UI dialog with an iframe: function showDialog(url, title, refresh){ var horizontalPadding = 30; var verticalPadding = 30; var width = 650; height = 800; $( ...

jQuery UI confirmation dialog - manipulating output

I need to modify the dialog confirmation buttons. I want to have the confirm and cancel buttons swapped around (so cancel is to the right not the left of the confirm button). I also want to change the ...

jQuery dialog continue click event on form validation

On pdf downlaod link need to open a jQuery dialog and have a form taking name, email and a confirmation checkbox. There will be some validation on the fields eg. required min and max size etc... ...

Make Submit button not kill my dialog box

I have a form and I m trying to perform Ajax posts. With the default submit button the dialog window closes, with the jQuery button, nothing happens. I want the dialog window to stay open so I can ...

jQuery UI confirmation dialog and asp.net postback

I have a delete button in a gridview. For those not familiar with asp.net my delete button outputs like so: <a id="ctl00_cp1_dtgrAllRates_ctl02_lbDelete" class="lb" href="javascript:...

热门标签