I'd like to have a transition on width of a container which width of the container is equal to the width of content and content is changing by dom.
Here is a link http://jsfiddle.net/sabbasi/5xc5s08w/3/
Code from Fiddle:
var container = $(".container");
var nav = $(".nav");
var menu = $(".menu");
$(".sth1").click(function(){
nav.detach();
menu.appendTo(container);
menu.show();
});
$("button").click(function(){
menu.detach();
nav.appendTo(container);
});