Html5 ListBox

Set the dragStart property of the jqxListBox. Author: http://jqwidgets.com

by mark edwards

HTML

<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<link rel="stylesheet" href="http://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
<script src="http://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<div style="float: left;" id="listbox"></div>

JavaScript

$(document).ready(function () {
                var source = [
                    "Affogato",
                    "Americano",
                    "Bicerin",
                    "Breve",
                    "Café Bombón",
                    "Café au lait",
                    "Caffé Corretto",
                    "Café Crema",
                    "Caffé Latte",
                    "Indian filter coffee",
                    "Instant coffee",
                    "Irish coffee",
                    "Liqueur coffee"
		        ];

                // Create a jqxListBox
              $("#listbox").jqxListBox({width: 200, source: source, checkboxes: true, height: 250});
                // Check several items.
                $("#listbox").jqxListBox('checkIndex', 2);
                $("#listbox").jqxListBox('checkIndex', 5);


                $("#listbox").on('checkChange', function (event) {
                if  ( 'mark' in this )  {
                    this.mark++;
                } else {
                    this.mark = 0;
                }
                console.log(this.mark);
                debugger;
                    if  ( 'tmpDisable' in this ) {
                        delete this.tmpDisable;                   //tmpDisable = false;
                        // skip because code just tripped this event.
                    } else {
                        if  ( this.savedInnerText === '' )  {
                            return false;  // user just clicked the checkbox
                        } else {
                            var args = event.args;                            
                            this.tmpDisable = true;                 //tmpDisable = true;  
                                  // set so we dont accidentally do this again
                            if (args.checked) {
                                $("#listbox").jqxListBox('uncheckIndex', args.item.index);
                            } else {
                               ...