Comments (6)
Please post a publicly viewable example demonstrating the problem — thanks!
from jquery-modal.
Here it is: http://codepen.io/mdmoura/pen/wmtlf
I tested it in Firefox and when I click the open button for the second time I get the error:
Error: TypeError: this.blocker is undefined
Source File: http://kylefox.ca/jquery-modal/jquery.modal.min.js
Line: 7
There is something else strange: I have showClose: false but the close button is still generated by Modal.
So I keep ending with two close buttons on the modal ... Am I missing something?
from jquery-modal.
Here's a fixed version of your example: http://codepen.io/anon/pen/vyquB
The problem stems from the same issue as the other issue you posted — you can't use both rel="modal:open"
and manually open a modal with JavaScript. You need to use one or the other. That was why you couldn't open the modal twice, and it's also why the close button was still appearing.
from jquery-modal.
Got it ... A suggestion: why not use CSS to define the opacity, color and z-indez of the overlay?
I think it is easier to integrate that into the projects as sometimes variables are used for colors (skins) and z-indexes (to organize the z-index order of various elements)
from jquery-modal.
I went with CSS because I wanted as much functionality included in the Javascript as possible so that there was minimal external CSS required. But it's not a bad idea using pure CSS.
from jquery-modal.
IMHO, pure CSS is better because the styling is separated and it is easier to adapt to every project.
When I read "Most plugins I've found try to do too much, ..." I decided to use your plugin.
What is missing is pure CSS ... IMHO I would remove overlay, opacity and zIndex from the plugin.
I would add to a .Overlay CSS class and would allow to change the class name on the plugin options.
And if this was my work I would even remove the auto generated Close button, so closeText and showClose.
I would remove because your solution "< a href="#close" rel="modal:close" >Close window< /a >" is really elegant and so easy to implement so why having an option to auto generate a close button when its placement in the markup will be useless most of the time? The close button is placed at the end of the modal window ... Most of times it is used a cross on top right.
Well, but this is just my idea ... I tend to use and develop simple plugins ...
They are the only ones that can adapt to projects which can vary a lot.
from jquery-modal.
Related Issues (20)
- Scroll Issue with HTML Page in Modal Window
- Is there something like 'CATCH-ALL' for the events? HOT 5
- browser crash due to memory usage on modal
- Incompatable with Bootstrap HOT 5
- Events are not showing - need to force quit audio/video on modal-close HOT 1
- Can't remove the close link and unable to use transitions
- why it include scss HOT 1
- How to open url ajax modal on pageload?
- Manually prevent modal close
- fix conflict with bootstrap modal class
- jquery-modal not displaying HOT 2
- Can CORS issue block div from Displaying on the screen?
- AJAX loaded modal not being removed from DOM on close
- mouseUp on overlay is closing modal
- Screen auto scrolls up on link click HOT 2
- Close a specific modal popup, by providing the element Id HOT 1
- Trouble Displaying an iFrame HOT 6
- BEFORE_CLOSE Event doesnt seem to fire? Want to stop iframe on modal close
- Events inside Jquery Modal not working when call modal('show') method
- Multiple imports of jquery modal HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-modal.