I’m trying to put a DIV block to fullscreen and create a "go back" button to return to previous size and position.
For the moment I must use .append(); to set position to 0px et size to 100%.
But how to add a go back caption?
Click on a block and see.
Here’s my sample: Go To jsFiddle !
Some one have a tips?
Thx in advance and sorry for my english !
.append()moves your element to another place in the DOM. This doesn’t seem to be a good idea, first of all because you are moving alielement outside a list (ol/ul) where is doesn’t belong and second because you don’t actually want to to be logically somewhere else, but just look differently*.Obviously you are moving the element because it’s inside another absolutely positioned element making it be positioned relativity to that element instead of the body. This gives gives you two options:
A) Change your CSS so that your DIVs which you what to display full screen aren’t inside another absolutely/relatively positioned element (other than body). Then you can leave the
.append()call out and just set the CSS.or
B) Store the “location” (for example the previous or next element) and move the element back there.