jQuery UI Widgets Forums Lists ListBox double click on listBox

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • double click on listBox #55044


    is there a way to implement double click to select item in listBox ?

    double click on listBox #55066


    Hello jahnvi25,

    Here is how to implement listbox item selection on double click:

    <!DOCTYPE html>
    <html lang="en">
        <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="../../scripts/demos.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script>
        <div id='content'>
            <script type="text/javascript">
                $(document).ready(function () {
                    var source = [
                        "Café Bombón",
                        "Café au lait",
                        "Caffé Corretto",
                        "Café Crema",
                        "Caffé Latte",
                        "Caffé macchiato",
                        "Café mélange",
                        "Coffee milk",
                        "Cafe mocha",
                        "Cuban espresso",
                        "The Flat White",
                        "Greek frappé coffee",
                        "Iced Coffee",
                        "Indian filter coffee",
                        "Instant coffee",
                        "Irish coffee",
                        "Liqueur coffee"
                    // Create a jqxListBox
                    $("#jqxWidget").jqxListBox({ selectedIndex: 3, source: source, width: 200, height: 250, enableSelection: false });
                    $("#jqxWidget .jqx-listitem-state-normal").dblclick(function (event) {
                        var item = $(event.target).text();
                        $("#jqxWidget").jqxListBox("selectItem", item);
            <div id='jqxWidget'>

    Best Regards,

    jQWidgets team

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.