Frost
Frost

Reputation: 41

jqueryMobile panel theme not working

I cannot figure out for the life of my why this jquery mobile panel won't render with the same look and feel of the jquery mobile theme used in the application.

The panel is loading on the same page as the rest of my jquery mobile page so the jquery mobile css files and jquery js files are all referenced and working on other parts of the page.

What am I missing within my layout?

thanks

 <div data-role="page" id="map_page">
        <div data-role="panel" id="transitLayersPage" data-position="right" data-display="overlay">
            <div data-role="header">
                <h1>Routes</h1>
            </div>        
            <div data-role="controlgroup">
                <div id="checkboxes">
                    <input type="checkbox" id="transitRoutesLayerKML0" onclick="toggleLayer(0)" />
                    <label>Routes 1</label>
                    <input type="checkbox" id="transitRoutesLayerKML1" onclick="toggleLayer(1)" />
                    <label>Routes 2</label>
                    <input type="checkbox" id="transitRoutesLayerKML0" onclick="toggleLayer(2)" />
                    <label>Routes 3</label>
                    <input type="checkbox" id="transitRoutesLayerKML1" onclick="toggleLayer(3)" />
                    <label>Routes 4</label>
                    <input type="checkbox" id="transitRoutesLayerKML0" onclick="toggleLayer(4)" />
                    <label>Routes 5</label>
                    <input type="checkbox" id="transitRoutesLayerKML1" onclick="toggleLayer(5)" />
                    <label>Routes 6a</label>
                    <input type="checkbox" id="transitRoutesLayerKML0" onclick="toggleLayer(6)" />
                    <label>Routes 6b</label>
                </div>
                <a href="#my-header" data-role="button" data-rel="close">Close panel</a>
            </div>
            </div>

Upvotes: 1

Views: 73

Answers (1)

Omar
Omar

Reputation: 31732

You forgot to add for attribute to label. Moreover, you should not use duplicate id for checkbox, each checkbox must have a unique id.

<input type="checkbox" id="foo">
<label for="foo">bar</label>

Demo

Upvotes: 1

Related Questions