UI Deploy

Curated, Short, Web UI Dev we Love.

Javascript Tutorial - Generic Resizeable Container

So a long while ago (last November), we posted some tutorials on how to create a resizeable textbox (Part 1, Part 2, and Part 3). We even did a post on how you could integrate the new textbox into Wordpress. Well, I got a request recently to expand the resizeable textbox code so that it could be a resizeable container for anything on a web page. So the result of that request is what we are going to be taking a look at today.

I'm not going to go into a lot of detail on the code - partly because there is a lot of it, partly because I'm lazy, and mostly because we have actually already covered it in the tutorials I linked to above. In fact, I would suggest reading those tutorials first (or at least skimming them), so you get a sense of how the resizing code works. What I'm going to focus on here are the changes that needed to be made to the old code to make it support containing any element. Of course, no tutorial would be complete without an example, so play around for a few moments:

view post...

Advertisement