I've done a jquery-mobile controlgroup using input buttons like this:
<div data-role="controlgroup" data-type="horizontal" class="panelSwitcher">
<input type="button" data-iconpos="notext" data-icon="gallery" value="Gallerie" class="viewGrid" />
<input type="button" data-iconpos="notext" data-icon="panels" value="Panels" class="viewPanel" />
<input type="button" data-iconpos="notext" data-icon="detail" value="Detail" class="viewDetail" />
</div>
I'm using this to switch views (add/drop a single class, rest CSS), so I don't really want to do this using link tags (empty href/alt) and event-binding. Radio-button-form is also too complicated, plus you cannot do icon only radios.
So input type=button.
Question:
I'm loading my page in gridview, so I want to have the gridview button preselected. I know I can jQuery addClass('ui-btn-active') to the parent .ui-btn element, but I want to know if there is a markup-only solution, too?