jQuery UI Widgets Forums Lists ListBox Doubleclick to select item

This topic contains 3 replies, has 3 voices, and was last updated by  Pietervk 7 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Doubleclick to select item #32796


    How to have doubleclick to select an item instead of just ‘select’?

    Doubleclick to select item #32836


    Hello bobsov,

    Unfortunately, this functionality is not supported. However, you may find the following workaround useful:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.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 theme = "";
    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, theme: theme });
    $("#jqxWidget .jqx-listitem-element").click(function (event) {
    var label = event.target.innerHTML;
    var index = source.indexOf(label);
    var that = this;
    setTimeout(function () {
    var dblclick = parseInt($(that).data('double'), 10);
    if (dblclick > 0) {
    $(that).data('double', dblclick - 1);
    } else {
    $("#jqxWidget").jqxListBox('unselectIndex', index);
    }, 300);
    }).dblclick(function (event) {
    $(this).data('double', 2);
    <div id='jqxWidget'>

    Best Regards,

    jQWidgets team

    Doubleclick to select item #32899


    Thank you for the work around.

    Doubleclick to select item #92429

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

You must be logged in to reply to this topic.