blackberry / jQueryMobile-BB10-Theme

jQuery Mobile BlackBerry 10 Theme
Apache License 2.0
72 stars 56 forks source link

event is undefined in _setHeader of the dropdown #23

Closed jcreamer898 closed 12 years ago

jcreamer898 commented 12 years ago

For whatever reason, I am using the dropdown and the event here... item = $(event.target); is undefined. It appears as though the item variable is unused anyways, so perhaps it should just be removed?

_setHeader: function(text) {
    var headerText = this.header.find('.ui-btn-text'),
            headerStatusText = headerText.find('.ui-collapsible-heading-status'),
            item = $(event.target);

    //Check if the content has been enhanced yet
    if(headerText.length === 0){
        this.header.text(text);
    } else {
        headerText.text(text).append(headerStatusText);
    }
},
RedWolves commented 12 years ago

To clarify, no event seems to be passed in and is erring as undefined. Additionally item doesn't seem to be used. Talked with Jason Scott at the jQuery Developer Summit and we are going to remove that line.