Creating A Fluid Site UI: Draggable DIVs and Handling Them on The Client Side
Nishant Arora09/Dec/2012
Facebook
Twitter
LinkedIn
Reddit
hi All
Long Time No See. I have been receiving and overwhelming number of queries related to my previous posts and have been keeping busy a lot at my new Job. I won't be discussing anything about what I do or develop as it is Top Secret internal projects. For now, I was planning to create something which has been maybe around for long, but have never caught up with web masters.
Lately I just wanted to create menus and structures on a page movable. Well if you are using jQuery on your site, achieving this becomes a child play if you see what I mean.
But the problem with this is, as soon as you refresh the page, the div move backs to it's initial position. Which I think won't work if we are planning to build a UI for a website. So more research reveals that this can be implemented if we can communicate the coordinates of the elements back to the server, again people have already discussed about this too.
But I do not understand the need of increasing web traffic just for persistence. The idea is to handle all the persistence on the client side. That means we can use client side features of browser to implement this in a simple manner. For this example I will be using simple functions for reading and writing cookies mentioned on w3schools: