Closed broche closed 11 years ago
You should be able to set the bb-selected on the pill button in the onscreenready. That will set the DOM before it gets styled.
Be sure to use the element.getElementById('foo') to edit your screen's HTML and not document.getElementById('foo')
Awesome! That fixed it. Thanks Tim.
I have a div with a data-bb-type="pill-buttons" and statically create pill-buttons within said container. I want to save the state of which pill-button was selected when returning to the screen with them on it. So, in ondomready function, I set the 'data-bb-selected' attribute to true on whichever pill-button was previously selected, and then call bb.pillButtons.style(document.getElementById("pills"));
Unfortunately, this causes some weird issues where a new pill-button-container is added to the screen. [Shown in the picture below]
Is this a known issue, or am I doing something out of the ordinary here? Thanks.