In the example by reference, you can modify the script to change the elements as radio buttons
<style> #feedback { font-size: 1.4em; } #selectable .ui-selecting { background: #FECA40; } #selectable .ui-selected { background: #F39814; color: white; } #selectable { list-style-type: none; margin: 0; padding: 0; } #selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; } </style> <script> $(function() { $('#selectable li').bind('mouseup', function(e) { $(e.target).removeClass('ui-selecting'); var selected = $(e.target).attr('data-selected'); if (selected) { $(e.target).attr('data-selected', null); } else { $(e.target).addClass('ui-selected'); $(e.target).attr('data-selected', true); } }); $('#selectable li').bind('mousedown', function(e) { $(e.target).removeClass('ui-selected'); $(e.target).addClass('ui-selecting'); }); }); </script>
source share