Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Posts: 289
Registered: ‎10-17-2008
My Device: Torch 9800
My Carrier: Rogers

checkbox label behaviour



I have a checkbox with a label that follows after. I have bound a click event to the label but not to the checkbox. In the simulator, when I click the checkbox it is firing the label event and it doesn't toggle the checkbox.


I also run the code in Chrome and I don't get this behaviour. In Chrome, when I click the checkbox, it toggles as expected.


Any ideas on what might be the problem here?


Here is the code for the checkbox and label:

            treefieldChecklistHTML += "<input id=\'checkbox" + i + "\' type='checkbox'>" +
                                      "<label id=\'labelTask" + i + "\'>" + checklistToEdit.arrTasks[i].sDescription + "</label>" +

 Here is how I bind the label event:

        $('label:not(#labelDescription)').click(function (evt)
            }); // end .click bind



feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.