javascript - Magnific Popup - lightbox issue, plus mfp-hide seems to do nothing -


this first time using stackoverflow please patient me, heh.

i'm relative newbie when comes html, css , js, gotta use them work every , then. today i've applied magnific popup site i'm working on. i'm trying use "open fade-zoom animation" example, , modify fit needs of course. popup working, indeed, div popup box isn't hiding, despite having mfp-hide class. it's weird because dreamweaver preview hide it, chrome not (i'm on latest version of chrome windows, if helps.) also, lightbox magnific popup site displays behind every popup seen.

here's jsfiddle code. posting interface says need post code here here goes:

here's html:

<div>     <a class="popup-with-zoom-anim" href="#dialog">         <span>click here display dialog</span>     </a> </div>  <div id="dialog" class="zoom-anim-dialog mfp-hide">     <h1>dialog title</h1>     <br><br>     <p>dialog text</p> </div> 

my js (located inside script block right before </body> tag)

$(document).ready(function() {     $('.popup-with-zoom-anim').magnificpopup({         type: 'inline',         fixedcontentpos: false,         fixedbgpos: true,         overflowy: 'auto',         closebtninside: true,         preloader: false,         midclick: true,         removaldelay: 300,         mainclass: 'my-mfp-zoom-in'     }); }); 

and in case, css (located inside style block right on script block js)

/* styles dialog window */ #dialog { background: white; padding: 20px 30px; text-align: left; max-width: 700px; position: relative; box-shadow: 1px 1px 10px 5px rgba(0,0,0,0.25); left: 50%; right: 50%; z-index: 999; top: 100px }  /** * fade-zoom animation */  /* start state */ .my-mfp-zoom-in .zoom-anim-dialog { display:block; opacity: 0;  -webkit-transition: 0.2s ease-in-out;  -moz-transition: 0.2s ease-in-out;  -o-transition: 0.2s ease-in-out;  transition: 0.2s ease-in-out;   -webkit-transform: scale(0.8);  -moz-transform: scale(0.8);  -ms-transform: scale(0.8);  -o-transform: scale(0.8);  transform: scale(0.8);  }  /* animate in */ .my-mfp-zoom-in.mfp-ready .zoom-anim-dialog { opacity: 1;  -webkit-transform: scale(1);  -moz-transform: scale(1);  -ms-transform: scale(1);  -o-transform: scale(1);  transform: scale(1);  }  /* animate out */ .my-mfp-zoom-in.mfp-removing .zoom-anim-dialog { -webkit-transform: scale(0.8);  -moz-transform: scale(0.8);  -ms-transform: scale(0.8);  -o-transform: scale(0.8);  transform: scale(0.8);   opacity: 0; }  /* dark overlay, start state */ .my-mfp-zoom-in.mfp-bg { opacity: 0; -webkit-transition: opacity 0.3s ease-out;  -moz-transition: opacity 0.3s ease-out;  -o-transition: opacity 0.3s ease-out;  transition: opacity 0.3s ease-out; } /* animate in */ .my-mfp-zoom-in.mfp-ready.mfp-bg { opacity: 0.8; } /* animate out */ .my-mfp-zoom-in.mfp-removing.mfp-bg { opacity: 0; } 

that's i've got. i'm sorry if question's been answered already, have not been able find it. let me know if there's else can provide solve problem. , in advance reading. cheers.

i had similar issue mfp-hide class did nothing. caused not including magnific popup's css. check see if root cause too. can include following:

<link href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.0.1/magnific-popup.min.css" rel="stylesheet"> 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -