Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lightest non-modal dialog with jQuery?

Tags:

jquery

dialog

Here is a demo:

http://jqueryui.com/demos/dialog/

But it's too huge for me.

There are 2 thousand lines included in all.

I'd like to have one in a single file with less than 1 thousand lines.

like image 410
omg Avatar asked Dec 09 '22 19:12

omg


2 Answers

If you have an aversion to the complexity implied by a high line-count, you need to get over this or you'll end up doing voodoo, reimplementing from scratch for lack of trust, and choosing slightly-less-complex-looking but ultimately inferior libraries.

I say this because you ask for fewer lines of code, which is a good metric for complexity and maintainability, but a poor metric for important things like good design and good docs. Even size is seldom an issue, if you use minified code.

Take a deep breath and just include the file :)

like image 80
mk. Avatar answered Jan 03 '23 04:01

mk.


You can strip JQueryUI to its bare essentials by unchecking all of the things you don't need from the download when you get it at http://jqueryui.com/download.

I would imagine that you can get it below 1000 lines if you do this.

like image 25
Robert Harvey Avatar answered Jan 03 '23 05:01

Robert Harvey