Comments (9)
I did not know this line of code was needed.
$(html).appendTo('body').modal();
So it's settled, although I do not think this is an elegant solution. Is there another way?
from jquery-modal.
Do you have a publicly viewable test case?
from jquery-modal.
I'm having a similar problem with z-indexes when trying to set them higher than the default. I need to do some z-index manipulation on my existing design, so if I extend the defaults and set the zIndex: 10, for instance. Then the overlay works to properly cover my other elements that had 1-9 z-indexes set, but the modal (even though it has a z-index of 11, since it takes the set zindex and increments it by 1) isn't positioned above the overlay. I tried to do this with CSS first using !important to set the z-index of the elements (which also didn't work), so then I thought I'd try dropping to JS to actually change the initial value. Still not dice.
I'm using this code through the https://github.com/dei79/jquery-modal-rails gem and setting the z-index as such:
modal_customizations= {
zIndex: 10,
}
$.extend($.modal.defaults, modal_customizations)
The z-index does get set properly for the overlay at 10 and the modal at 11, it's just that the modal, even with the higher z-index doesn't show up on top of the overlay.
from jquery-modal.
Apparently this bug is a duplicate of #44
from jquery-modal.
@pr7vinas can you explain a little more how you use that code you referenced?
$(html).appendTo('body').modal();
Do you execute that when opening the modal I imagine?
from jquery-modal.
I think this pull request gets me fixed up dei79/jquery-modal-rails#14
from jquery-modal.
@jondkinney Sorry for the delay to reply.
This line of code is referenced in the documentation. This line is putting the modal at the end of the body, avoiding any problem with index. Yes I run this every time I need to show the modal. The jquery-modal will remove it automatically when the user closes the modal.
from jquery-modal.
@pr7vinas thanks for getting back to me. I'm a bit confused though, are you saying you run that line of code manually when executing the code to show the modal? For me, baking it into that line in the pull request fixed it globally... is that a solution you want to explore? Perhaps I'm missing something though. Thanks!
from jquery-modal.
@pr7vinas any clarification on this? Again, I needed to alter the gem to make this work... is there a way to achieve this without needing to alter the gem? If not, it seems like that pull request should be merged, right?
Thanks much
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.