jquery jqModal Ajax and nested modal problems -
I just started using jqModal because I need support for nested modal. I'm looking at some irregular behavior with Nested Models and AJAX, but I do not know how to fix it. What happens when I load the main model, which has a nested model, I get two JCM overlay divs, it seems that it is implementing the overlay for both modules, even if the nested one is still a trigger Has not happened. So even when I close the modal, an overlay is still being displayed. Here's the code:
// Main model $ (function () {$ ("# modal"). Jqm ({ajax: '@ href'})}}) A class = "labeled jqModal" href = "/ supplier / 2 / edit" & gt; View Supplier & lt; / A & gt; // Edit under nested modal code piece / suppliers / 2 / html / $ html ($ ("# nested_modal"). Jqm ({ajax: '@ href', zIndex: 3001});}) & lt; A class = "button jqModal" href = "/ supplier / 6 / bill / new" & gt; Add bill & lt; / A & gt; This works for the first time, but if I close the main model, then open again, I get a double overlay problem. Is this a bug? Or the way I'm calling my Nested Modal? Also, I know what to do with the nested modal, because when I remove the JKM call on Next Mode, the main modal works well every time.
I had similar problems with my Nested AJAX jqModals. Here's the solution: Combining the to Top parameter, z-index .
Set your high z-index to set the nested modal, and then correct when making JQM toop for example:
// nested: & lt; Div id = "test" style = "z-index: 5000;" & Gt; Test Content & lt; / Div & gt; ... & lt; Script type = "text / javascript" & gt; $ .ready (function () {$ ('# test'). Jqm ({toTop: true, model: true, overlay: 10,});}); & Lt; / Script & gt; Walking with z-index and toop parameters should help resolve your problem.
Comments
Post a Comment