vodkabears / Remodal

No longer actively maintained.
http://vodkabears.github.io/remodal/
MIT License
2.75k stars 771 forks source link

jQuery 3? #203

Open Nettsentrisk opened 8 years ago

Nettsentrisk commented 8 years ago

I've been trying to get this to work correctly, but it keeps getting stuck on the "opening" state. I realized that I'm running a beta version of jQuery 3, and that there may be some issues with that.

Any plan for a jQuery 3-compatible version?

Nettsentrisk commented 8 years ago

I think the only thing that doesn't work is the new breaking way show/hide function, now that I think about it.

Nettsentrisk commented 8 years ago

Per best practices, show/hide calls should be replaced by either adding/removing a class name, which can be styled via CSS to give the correct display property; or as I have rewritten for my application, substituting .attr('hidden','') for .hide() and .removeAttr('hidden') for .show().

hidden is an HTML5 attribute that is supposed to be hidden by default in the user agent stylesheet, and can be defined with display:none!important in the author stylesheet to be sure that's how it acts.

Then you rewrite the default CSS for remodal a bit so as to not have display: none by default on a few selectors, and it's fixed for jQuery 3!