DISABLE ADBLOCK

ADBlock is blocking some content on the site

ADBlock errore

How do I create a draggable and resizable JavaScript popup window?

StackOverflow https://stackoverflow.com/questions/30706

Question

I want to create a draggable and resizable window in JavaScript for cross browser use, but I want to try and avoid using a framework if I can.

Has anyone got a link or some code that I can use?

Solution

JQuery is more focused on a lot of nice utility functions, and makes DOM manipulation a whole lot easier. Basically, I consider it to be Javascript as it should have been. It's a supremely helpful addition to the Javascript language itself.

ExtJS is a suite of GUI components with specific APIs... Use it if you want to easily create components that look like that, otherwise, go with a more flexible framework.

OTHER TIPS

JQuery would be a good way to go. And with the Jquery UI plugins (such as draggable), it's a breeze.. (there's a demo here).

Not using a framework, to keep it 'pure', seems just a waste of time to me. There's good stuff, that will save you tremendous amounts of time, time better spent in making your application even better.

But you can always check out the source to get some 'inspiration', and adapt it without the overhead of the stuff you won't use. It's well done and easy to read, and you often discover some cross-browser hacks you didn't even think about..

edit: oh, if you REALLY don't wan't no framework EVER, just check out their source then.. sure you can use some of it for your application.

Sometimes you can't choose your environment or architecture, so you're stuck working within constraints like not being able to use frameworks...

Avoiding a framework altogether will leave you with lots of code and a bunch of tedious browser-testing.

If you would consider a framework I'd suggest jQuery with the jqDnR plugin. I think it will solve your problem or perhaps you could combine the functionality of the jQuery draggables with the jQuery resizables

Just trying to avoid large framework downloads to the client for one very small thing, perhaps I am being daft.

I had looked at jQuery but also ExtJS, the documentation and UI 'look' seem far superior and professional in ExtJS ... are there particular reasons for you guys recommending jQuery?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow