问题
Seeking some advice as to whether use jQModal window or instead use the jQuery UI Library for a modal window ?
The jQModal lib is only 2.4KB while the jQuery UI lib is like 32KB - generally all I am looking for is a modal window ?
回答1:
I would use jQuery UI modal.
- Official and well supported.
- jQuery UI and themes are available on Google's CDN.
- You may want to use other parts of jQuery UI down the track.
But then again, if the filesize difference bothers you, just use the jQModal plugin. Bear in mind too that the jQuery UI on the CDN has a good chance of already being cached and therefore instantly available to the end user.
回答2:
If you just want any old modal window, pick the smaller plugin file. If that's not critical, then compare features. Does one offer pleasing transitions that the other lacks? Is it simple to style one versus the other? Do the methods of one suit your style better than the other? If all else is equal, pick the smaller file, but take a few minutes to compare them and consider your project. There's probably a more compelling reason to pick one than just bytes, but you have to find it.
来源:https://stackoverflow.com/questions/4253073/jqmodal-or-jquery-ui-dialog