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?
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?
Share Improve this question asked Aug 27, 2008 at 17:45 DanDan 1,5711 gold badge24 silver badges34 bronze badges 1- Why don't you want to use a framework? They will save you a lot of work. codinghorror./blog/archives/001163.html Edit: Not using a framework is an option, but frankly, in order to get a good implementation that is cross-browser patible you're probably going to have to spend at least a day or two and end up writing several pages of code, all of which is already done for you with a simple call to a framework. – levand Commented Aug 27, 2008 at 17:53
5 Answers
Reset to default 2JQuery 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 ponents with specific APIs... Use it if you want to easily create ponents that look like that, otherwise, go with a more flexible framework.
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 bine 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 remending jQuery?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744331844a4568925.html
评论列表(0条)