Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
start: function (e, ui) {
var radio_checked= {};
me.$el.find('input[type="radio"]', this).each(function(){
radio_checked[$(this).attr('name')] = $(this).val();
$(document).data('radio_checked', radio_checked);
}).bind('sortstop', function (event, ui) {
var radio_restore = $(document).data('radio_checked');
$.each(radio_restore, function(index, value){
$('input[name="'+index+'"][value="'+value+'"]').prop('checked', true);
Copy link

jimmyko commented Jun 3, 2016

$(document).data() is not a good way to store the radio value.

Copy link

amit-srivastava-007 commented Sep 5, 2017

What is me.$el ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment