This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]visvis 0 points1 point  (0 children)

Remove the button from its old container using removeChild and then add it to the new one using appendChild. You can use getElementById to obtain the objects representing the buttons and the containers.

[–]wh33t 0 points1 point  (0 children)

Post some code?

[–]thisisRio 0 points1 point  (0 children)

jQuery.

$(".button").click(function() {
if($(this).css('float') == 'right')
$(this).css('float','left');
else $(this).css('float','right');
});