English 中文(简体)
Jquery 界面 - 多个对话框
原标题:Jquery UI - multiple dialog boxes

我像这样初始化了我的jquery ui, 我可以让它为一个对话框工作:

    <script>
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
    $( "#treatment" ).dialog({
        autoOpen: false,
        show: "blind",
        hide: "explode"
    });

    $( "#opener" ).click(function() {
        $( "#treatment" ).dialog( "open" );
        return false;
    });
});
</script>

用户必须点击“更多信息”才能发现更多信息,

        foreach($foo[ MedCond ] as $row)
    { 
    ?>

            <tr>
<td><b>Name:</b></td>
<td><b>Symptoms:</b></td>
<td><b>Treatment:</b></td>
<td><b>Effective From:</b></td>
<td><b>Effective To:</b></td>
    </tr>
        <tr>
        <td><?php echo $row[ Name ];?></td>
        <td><?php echo $row[ Symptoms ];?> </td>
        <td><div id="treatment"><p><?php echo $row[ Treatment ];?></p></div><button id="opener">More info</button></td> [...]

所以对于每行的治疗, 都有一个相应的对话框打开按钮, 一旦他们点击这个按钮, 特定治疗的细节就会显现出来。 我有这个功能, 但是当更多的人分享同样的“ 治疗 div ” 时, 它就会失败 。

我怎么能让这工作。

欢呼声。

问题回答

使用类而非代号 是指使用$( “. dressment” ) 。 对话框和书写 div 类=" treating" 。 相同的开口程序 。





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签