Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why choose SimpleModal over jQuery UI Dialog?

New to Javascript/jQuery. I was looking for a good popup solution then I found the jQuery plugin SimpleModal, from Eric Martin, which seemed to be quite popular. I am curious as to why people would choose plugins like SimpleModal over the jQuery UI Dialog. What are the pros and cons when comparing the two? Thanks.

like image 903
tamakisquare Avatar asked Jun 13 '11 21:06

tamakisquare


People also ask

Why would someone use the jQuery UI plugin?

jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.

What is jQuery UI dialog?

The jQuery UI dialog method is used to create a basic dialog window which is positioned into the viewport and protected from page content. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default. Syntax: You can use the dialog ()method in two forms: $(selector, context).

What is a jQuery modal window?

JQuery Modal is an overlay dialog box or in other words, a popup window that is made to display on the top or 'overlayed' on the current page. It is a pop up modal box that is converted into the viewport deliberately for the user to interact with before he can return to the actual site.


2 Answers

Here was my response to someone on Twitter with a similar question:

it really depends on your needs. @SimpleModal is more of a clean slate to build from and establish your own look and feel.

Others have summed up the pros and cons quite well. I call SimpleModal a modal dialog framework. It gives you the bare-bones to create modal dialogs that fit your needs.

However, jQuery UI is an awesome library and if you are using other jQuery UI components, want the styling "out of the box", or want to use the theming ability, it's a great choice as well!

like image 195
Eric Martin Avatar answered Oct 30 '22 20:10

Eric Martin


I haven't personally used SimpleModal, but it looks like it is more of a lightweight solution. Instead of using the bulky jQuery UI (bulky, that is if you are only using it for a dialog), then it would be much faster to send clients JS for a simple modal to display messages.

Here is a breakdown:

jQueryUI:

  • Great if you are using many of its components, such as the dialog, datepicker, drag and drop, etc...
  • Maintains a uniform and clean look across all of your AJAX components
  • Bulky if only used for one of its components

SimpleModal:

  • Less JS, CSS, and images to send to user, relieving some server resources, and client download time
  • Great choice if you are only using AJAX for dialogs on your site
  • Not so consistent with the look and feel of other jQuery components, if you plan to integrate more, such as a date-picker

In the end, it is really up to you, but here are some pointers.

Hope that helps.

like image 33
Oliver Spryn Avatar answered Oct 30 '22 20:10

Oliver Spryn