jQWidgets Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts

  • wnema
    Participant

    The behavior I wanted using jQuery is:
    HTML

        <input class="chkRelevance" type="checkbox" id="chkRel1" />
        <label for="chkRel1">Relevant</label>
        <span> </span>
        <input class="chkRelevance" type="checkbox" id="chkRel0" />
        <label for="chkRel0">Not Relevant</label>

    JS

        $(".chkRelevance").on('click', function (event) {
            var me = $(this),
                meChecked = me.prop('checked'),
                idx = parseInt(me.attr('id').substr(6)),
                other = $('#chkRel' + (idx ^ 1));
            if (meChecked && other.prop('checked')) {
                other.prop('checked', false);
            }
        });
    in reply to: jqxComboBox type versus select jqxComboBox type versus select #65156

    wnema
    Participant

    Hi Peter,
    Whether by design or a bug is debatable, I think. However, regarding the API issue I believe there should be support for $(“#jqxComboBox”).jqxComboBox(‘text’) or $(“#jqxComboBox”).jqxComboBox(‘label’) because when typing in a value $(“#jqxComboBox”).jqxComboBox(‘getSelectedItem’) isn’t defined and thus we cannot do $(“#jqxComboBox”).jqxComboBox(‘getSelectedItem’).label. $(“#jqxComboBox”).val() correctly gives you what you typed but when selecting from a drop down gives the “value” equivalent of <option value=”1″>one</option>. In other words, how can you in one call always get the text of either what you typed or selected from a list?

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