Keti777 / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
1 stars 0 forks source link

$("#s1").dropdownchecklist("destroy") doesn't work! #114

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, 

the following line of code doesn't work! can any help me please! it's urgent!!

thanks in advance,

$("#s1").dropdownchecklist("destroy"); 

my code is:

<html>
<head>

  <title>jQuery Dropdown Check List</title>

    <link rel="stylesheet" type="text/css" href="ui.dropdownchecklist.css" />
    <link rel="stylesheet" type="text/css" href="demo.css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="ui.core.js"></script>
    <script type="text/javascript" src="ui.dropdownchecklist.js"></script>
    <script type="text/javascript">

        $(document).ready(function() {

    $("#s1").append($('<option></option>').val("four").html("four"));
    $("#s1").append($('<option></option>').val("four").html("four"));
        $("#s1").dropdownchecklist();

        });

function test()
{

        $(document).ready(function() {

    $("#s1").dropdownchecklist("destroy");
    $("#s1").append($('<option></option>').val("four").html("fodur"));
    $("#s1").append($('<option></option>').val("four").html("fodur"));
        $("#s1").dropdownchecklist();

        });

}
 </script>   

</head>

<body onload="test()" >

<div id="content">

    <p>
        <select id="s1" multiple="multiple" name="r">

        </select>
    </p>

</div>

</body>
</html>

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by cedric.c...@gmail.com on 20 Aug 2010 at 11:43

GoogleCodeExporter commented 8 years ago
Pending version 1.1 will be compatible with jQuery 1.4.2, ui 1.8.4.
Release version 1.0 is based on jQuery 1.3.2, ui 1.7.2

Original comment by womohun...@ittrium.com on 17 Sep 2010 at 5:07

GoogleCodeExporter commented 8 years ago
Issue addressed with version 1.1.  Please let me know if you have any problems.

Original comment by womohun...@ittrium.com on 23 Sep 2010 at 3:31

GoogleCodeExporter commented 8 years ago
hi :)
This bug still exists in 1.4.

<html>
    <head>
        <script src="js/jq/jquery.js"></script>
        <script src="js/jq/jquery-ui-1.8.14.custom.min.js"></script>
        <script src="js/jq/ui.dropdownchecklist-1.4-min.js"></script>

        <link href="css/jquery-ui-1.8.14.custom.css" />
        <link href="css/ui.dropdownchecklist.css" />

    </head>
    <body>
        <ul class="types_container">
            <li>
                <select id="graph_channels" multiple name="graph_channels">
                    <option value="one">one</option>
                    <option value="two">two</option>
                    <option value="three">three</option>
                    <option value="four">four</option>
                </select>
            </li>
        </ul>

        <script>

            function crateDropDownList() {

                $("#graph_channels").dropdownchecklist("destroy");
                $("#graph_channels").dropdownchecklist({
                    firstItemChecksAll : false,
                    forceMultiple : true,
                    icon : {
                        placement : 'right',
                        toOpen : 'ui-icon-triangle-1-s'
                    },
                    width : 400,
                    maxDropHeight : 400
                });
            }

            setInterval(crateDropDownList, 100);

        </script>
    </body>
</html>

Original comment by vitali...@gmail.com on 7 Jan 2013 at 2:48