This is a migrated thread and some comments may be shown as answers.

Uncaught TypeError: Cannot read property 'checked' of undefined

0 Answers 411 Views
PopOver (Mobile)
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 09 Nov 2012, 07:59 PM
Hi,


I am using the popover with listview and checkbox or radio items. With radio everything works finde, but when I am using checkboxes I get the Error: Uncaught TypeError: Cannot read property 'checked' of undefined
Any idea, what could be wrong? I am creating the Items like this:

$this.children().each(function (i) {
    var $item = $("<li><label>" + $(this).val() + " <input type=\"" + (base.multiple ? "checkbox" : "radio") + "\" " + (this.selected ? "checked=\"checked\"" : "") + " /></label></li>");
    listview.prepend($item);
    var that = this;
    $item.on("click", function () {
        console.log("test");
        that.selected = true;
        $this.ButtonCombobox("setSelection");
    })
});
The error is thrown before output "test" and is thrown by kendo.mobile.min.js.

No answers yet. Maybe you can help?

Tags
PopOver (Mobile)
Asked by
Kevin
Top achievements
Rank 1
Share this question
or