magnific-popup

Magnific Popup: source title from span

浪子不回头ぞ 提交于 2019-12-03 08:11:11
I want to take the title for my Magnific images from a hidden caption field inside the anchor tag - NOT from the title. This is because my title contains markup. HTML <a href="img/zoom.jpg"> <img src="img/small.jpg" alt=""> <span class="hide">This is a caption with <a href="#">a link</a> in it</span> </a> JS // initialise the magnific lightbox $('.js-lightbox').each(function() { $(this).magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current

How to embed youtube video in magnific popup?

妖精的绣舞 提交于 2019-12-03 05:55:21
问题 i have magnific popup plugin.but it not showing the video on popup How to embed youtube video in magnific popup? 回答1: Check the following link for documentation: Doc $(document).ready(function() { $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ disableOn: 700, type: 'iframe', mainClass: 'mfp-fade', removalDelay: 160, preloader: false, fixedContentPos: false }); }); <a class="popup-youtube" href="http://www.youtube.com/watch?v=0O2aH4XLbto">Open YouTube video</a> Hope this helps

why magnific popup ajax box closes if clicked on content

扶醉桌前 提交于 2019-12-03 05:52:49
Please Please Please help me.. I have been trying to get the magnific popup ajax box to show login form. It seems that form appears but as soon as I click anywhere in form or ajax body, it disappears. below is the code $(document).ready(function() { $('.ajax-popup-link').magnificPopup({ type: 'ajax', alignTop: false, closeOnContentClick: false, overflowY: 'scroll' }); }); <a class=".ajax-popup-link" href="result.php">try me</a><br> Below is the php that I look to load in ajax box. This is not the complete one Email:<div class="field_container">Password:</label> <input type='password' name=

Magnific-popup fails to open from button inside Google Maps infoBox

不羁岁月 提交于 2019-12-02 16:24:26
问题 I have an infoBox that opens when clicking on a google maps marker. Inside the infoBox there is a button '#open-popup' that when clicked should to open a magnificPopup modal window but nothing happens. As a test I have put the same button outside the div containing the google map, which opens the modal window but only on the second click! What is going on? I have tried all sort of things for days but all have worst side effects. Any help will be much appreciated. HTML for button inside

Use magnificPopup with dynamic elements

时光总嘲笑我的痴心妄想 提交于 2019-12-02 07:45:08
问题 I have two photos, both have the class "foto". Under each photo i added a button which allows me to delete the photo. However, i can still open the photo in the galery after removing a photo from the DOM, instead of 1 of 1 photos like expected, i still have 1 of 2 at the bottom right and i can still see the deleted photo within magnificPopup's galery. Is it still in the cache? $(document).ready ( function() { $('.foto').magnificPopup ( { type: 'image', closeOnContentClick: false,

Use magnificPopup with dynamic elements

折月煮酒 提交于 2019-12-02 06:33:43
I have two photos, both have the class "foto". Under each photo i added a button which allows me to delete the photo. However, i can still open the photo in the galery after removing a photo from the DOM, instead of 1 of 1 photos like expected, i still have 1 of 2 at the bottom right and i can still see the deleted photo within magnificPopup's galery. Is it still in the cache? $(document).ready ( function() { $('.foto').magnificPopup ( { type: 'image', closeOnContentClick: false, closeBtnInside: false, mainClass: 'mfp-with-zoom mfp-img-mobile', image: { verticalFit: true, titleSrc: function

How do I define a gallery of inline content in HTML for use with Magnific-Popup ?

一个人想着一个人 提交于 2019-12-01 18:54:44
I have many galleries on a page which are launched from their respective buttons. I like the idea of defining the markup for the galleries in the page alongside the button and then hiding using the .mfp-hide . However I cannot get the popup to activate when I add the delegate keyword (it does otherwise). Here is the code I have so far, HTML <div id="gallery1" class="mfp-hide"> <div class="slide"> ... some content for slide 1 ... </div> <div class="slide"> ... some content for slide 2 ... </div> </div> <p>Blah blah <a href="#gallery1" class="open-gallery-link">view gallery one</a> blah blah ...

Magnific Popup - Popup disappearing on click

被刻印的时光 ゝ 提交于 2019-12-01 16:38:05
I've just recently implemented the 'Magnific Popup' and the popup comes up fine, however when I click an input box the entire popup disappears back to the parent page. On the examples shown on the plugin website, the entire dialog box is clickable until you click outside of that box. I'm hoping its just something extremely simple I've missed, but it's still doing my head in. I really appreciate any help I can get! Thanks :) If you're using "ajax" content type, you need to make sure that you've got only one root node. http://dimsemenov.com/plugins/magnific-popup/documentation.html#ajax_type E.g

Magnific Popup - Popup disappearing on click

╄→гoц情女王★ 提交于 2019-12-01 16:34:20
问题 I've just recently implemented the 'Magnific Popup' and the popup comes up fine, however when I click an input box the entire popup disappears back to the parent page. On the examples shown on the plugin website, the entire dialog box is clickable until you click outside of that box. I'm hoping its just something extremely simple I've missed, but it's still doing my head in. I really appreciate any help I can get! Thanks :) 回答1: If you're using "ajax" content type, you need to make sure that

how to open popup within popup in magnific popup plugin

这一生的挚爱 提交于 2019-11-30 21:24:46
can anybody tell me how to open popup within popup using magnific-popup jquery plugin (using ajax). $('.ajax-popup-link').magnificPopup({ type: 'ajax' }); <a href="path-to-file.html" class="ajax-popup-link"> Link 1 </a> on "path-to-file.html" <a href="path-to-other-file.html" class="ajax-popup-link"> next popup </a> Thanks You can't have two windows open at once. But the content of popup is replaced when is called second time, here is example - http://codepen.io/dimsemenov/pen/hwIng I know this an old thread, but for anyone still interested, this worked for me: $(document).on('click', '.sAjax'