Radio Buttons getting deselected when dragging item using jQuery Sortables?

It may not be exactly what you're looking for, but changing.

It may not be exactly what you're looking for, but changing $('#itemlist').sortable(); to $('#itemlist'). Sortable({placeholder: ". Items li"}); keeps the radio button selections.

Tried in FF3, IE7 and Chrome and works the same. Radio buttons are cleared (FF and chrome) or reseted (IE7) – Serhii Nov 17 '08 at 8:30 It looks like it depends on your version of jquery.ui. I get the same results as you when I use 1.5.2, but I get just the opposite with 1.6rc2 (radio buttons cleared in FF and chrome using helper and persist using placeholder.) IE doesn't seem to work either way for me either.

– Ben Koehler Nov 17 '08 at 16:32 You are right. With 1.6rc2 the default is to copy the element innerHtml in the placeholder. Setting the placeholder option to any non empty string overrides this behaviour.

– Serhii Nov 19 '08 at 16:17.

IE is known to lose the selection of checkboxes and radios when copied/moved. webbugtrack.blogspot.com/2007/11/bug-299... defaultChecked needs to be reset for IE to behave.

UPDATE: This applies for jQuery. Ui 1.5.2. If you are using 1.6rc2 try Ben Koehler solution.It seems that the sortables plugin clones the node being moved.

If we clone the nodes using $('#itemlist li').clone(). AppendTo("#itemlist"); we'll see a similar behavior, because now there are 4 radio buttons with the same name, instead of two. You can override the way the sortables plugin works with the helper option.

Try this: $('#itemlist'). Sortable({helper: function(){ return $(""). Css({border: "1px solid red", background: "transparent"}).

AppendTo("#itemlist")0; }}); We are creating a new node without radio buttons and appending it to the list. This new node will be the one that is animated. This code works fine in FF3 and Chrome, but IE7 keeps reseting the radio buttons to its default state.

Some sort of answer to radio buttons losing their status is here core.trac.wordpress.org/ticket/16972#com... it's a bit of long way around but only way I could find to re do radio buttons status after being dragged somewhere.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions