anseki / jquery-plainmodal

The simple jQuery Plugin for fully customizable modal windows.
http://anseki.github.io/jquery-plainmodal/
MIT License
78 stars 11 forks source link

Cannot disable overlay #4

Closed d-bo closed 9 years ago

d-bo commented 9 years ago

Hi. I cannot disable overlay by setting "overlay: false"

anseki commented 9 years ago

Hi d-bo, thanks for your post. Well, I don't know overlay: false... Where did you find it? And did you set it to option? Could you show me your code?

d-bo commented 9 years ago

I cannot find it docs, so it is my guess)

          var button = $('#rss-modal').click(function() {
            modal.plainModal('open');
          });
          var modal = $('#rss-feed').plainModal({
            offset: function() {
              var btnOffset = button.offset(), win = $(window);
              return {
                left:   btnOffset.left - win.scrollLeft()
                          + parseInt(this.css('borderLeftWidth'), 10),
                top:    btnOffset.top - win.scrollTop()
                          + parseInt(this.css('borderTopWidth'), 10)
              };
            },
            overlay: false
          });
        }
anseki commented 9 years ago

If you want to just hide the overlay, add this to CSS (not option):

.plainmodal-overlay { display: none !important; }
d-bo commented 9 years ago

Yes, but:

I think this is more a feature request than an issue) Thanks.

anseki commented 9 years ago

No..., features you requested are not needed for plainModal. Because plainModal is plugin to do those you want to disable. If you don't need those, you don't need plainModal. Remember, plainModal is plugin for the modal window. I don't know that you want to do, but I think that something that you want is not the modal window. The modal window is the GUI system that avoids accessing the outside elements of it by the user. https://en.wikipedia.org/wiki/Modal_window That is, the overlay should not be hidden for modal window in principle.

I think that you might need the normal popup plugins.

d-bo commented 9 years ago

Thanks for spending time to explain. Misunderstod the modal window concept)

anseki commented 9 years ago

:thumbsup: If you want to just show/hide an element as popup, you probably don't need any plugin. A very easy way: switching a CSS property. Well, I close this issue, ok?