mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-08-27 13:06:04 +02:00
15 lines
398 B
JavaScript
15 lines
398 B
JavaScript
(function($) {
|
|
$(document).ready(function() {
|
|
$('ul.SelectionGroup input.selector').live('click', function() {
|
|
var li = $(this).parent('li')
|
|
li.addClass('selected');
|
|
|
|
var prev = li.prevAll('li.selected');
|
|
if(prev.length) prev.removeClass('selected');
|
|
var next = li.nextAll('li.selected');
|
|
if(next.length) next.removeClass('selected');
|
|
|
|
$(this).focus();
|
|
});
|
|
})
|
|
})(jQuery); |