jQuery UI split button toggle - toggle both parts of the button
- by the berserker
I would like to implement a toggle splitbutton with jQuery UI that would on toggle action change the style of the "dropdown" part as well (as seen in http://jsfiddle.net/8khz2/3/ - I'd like to appear it on 1st click as white, same as "Toggle" button does).
Does anyone see a way to achieve that out of the box or only with CSS, without additional javascript code?
Somehow I don't see an option doing it only with CSS, since I can not nest the "dropdown" button in "Toggle", since toggle part is checkbox:
<input type="checkbox" id="toggle"/><label for="toggle">Toggle</label>
<button id="select">Select an action</button>
The jsfiddle example is based on: http://jqueryui.com/button/#splitbutton