magnific-popup

Laravel 4 Ajax check to include XMLHttpRequest (from Magnific Popup)

吃可爱长大的小学妹 提交于 2019-12-19 04:23:21
问题 Using the code from this question, @extends('layouts.' . isset($ajax) ? 'ajax' : 'master') to check for Ajax. It works for regular Ajax page loads but not when using a popup. In this case I'm using Magnific Popup's Ajax mode, the request header is XMLHttpRequest but Laravel returns the non-ajax (extended) layout. 回答1: First of all I don't know how the $ajax variable is being set( isset($ajax) ), but the right way to check for an ajax request in Laravel is if(Request::ajax()) { // ... } Or,

How to reset setInterval function on event click on popup close

ⅰ亾dé卋堺 提交于 2019-12-13 09:52:33
问题 <script> $(document).ready(function () { setInterval(function () { $.magnificPopup.open({ items: { src: '#test-popup' }, type: 'inline' }); }, <?php echo $time_popup; ?>); }); </script> This is my script. I try to reset set interval function, when click close to popup. I use magnific popup, try with this, without result. 回答1: You have to assign your setInterval call to a variable to be able to reset it with clearInterval . var timer = setInterval(function() { // Your stuff. clearInterval

Magnific popup - how to open it on mouseover?

不打扰是莪最后的温柔 提交于 2019-12-13 07:46:17
问题 I'm using Magnific popup our product product pages as a method for image hot points. Right now when you click on a hot point a popup appears with larger image and text. I received a request to open the popup on a mouseover. Is there a way to trigger open Magnific Popup on a mouseover not on a mouse click? I was trying to call the mouseover event on the link first, but it seems the Popup still requires a click. How to I make it so it opens up just with a mouseover? <!-- Popup link --> <a href=

Magnific Popup not working on mobile

狂风中的少年 提交于 2019-12-13 07:39:52
问题 Magnific popup seems to be working fine on desktop AND even Android phone but on an iPhone it shows the messsage "A problem occurred with this webpage so it was reloaded" and doesn't play the Vimeo video. update: Just tried it on Chrome on my iPhone and it works fine. Looks like it's just Safari? This is the HTML code: <ul id="page1-slider7" class="bxslider"> <li> <div class="c c1"><a href="http://vimeo.com/80951188" target="_blank" class="portfolio-link video">Watch Video</a><img src="images

magnific popup modal closes on click

柔情痞子 提交于 2019-12-12 05:55:03
问题 I am trying to create a modal (won't close on 'esc' or 'click') popup with magnific popup. But for some reason, the popup closes on click or esc. I have followed examples here: http://jsfiddle.net/n6c5f/2/ and here: http://codepen.io/vemec/pen/JDsLl. Copying and pasting the exact code doesn't seem to work - the popup opens fine but closes on default events. This is my current HTML: <a href="#modal1" class="open-modal1">Open modal 1</a> <div id="modal1" class="clean-modal mfp-hide"> TEST Modal

Magnific-popup doesn't work at all

核能气质少年 提交于 2019-12-12 04:42:21
问题 i'm with some problems here. I've tried everything for days! I already look at other questions here to try to solve my problem, but i can't still make magnific-popup to work. I don't know what i'm doing wrong, i searched google, the original documentation, stackoverflow questions, but my site just doesn't show the pop-up. Here is the code i have so far. <!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="css/magnific-popup.css" /> <script src="http://ajax.googleapis.com/ajax

Magnific Popup for Wordpress post body images

霸气de小男生 提交于 2019-12-12 04:04:44
问题 I am working on a WordPress theme and I was wondering if there is a way of opening images in Magnific Popup which are inserted on a post body by the editor. So, any image I insert in a post through TinyMCE editor will open on Magnific Popup when clicked on the front end. 回答1: There are a few different approaches to this question. I've outlined a couple below. Option 1 Filter the content and apply a HTML attribute that can be targeted with Magnific Popup. We can take a cue from this article

magnific-popup, how to play an audio file when popup open and stop playing when closing it

梦想的初衷 提交于 2019-12-12 03:48:29
问题 I am using magnific-popup to display pictures ... Is it possible to start playing au audio file when the popup window open and stop it when closing the window ? <a href="images/capoeira.jpg" class="fh5co-project-item image-popup to-animate"> <img src="images/berimbau.jpg" alt="Animason groupes" class="img-responsive"> <div class="fh5co-text"> <h1>ANIMA'SON</h1> <span>Participants: minimum 10, maximum: 20</span> </div> </a> 回答1: I solved it by adding an audio tag within each image-popup link

Display PDF file inside Magnific-Popup modal

跟風遠走 提交于 2019-12-11 16:21:20
问题 I have a form on my website that the user needs to fill in order to generate a PDF file. If there are errors in the form, the server will respond with a json object with the list of errors, otherwise will respond with the PDF file (as a string). I'm trying to display that PDF file inside a Magnific-Popup (https://www.npmjs.com/package/magnific-popup). $('.preview-button').on('click', function (e) { event.preventDefault(); var theLink = $(this); var formElement = theLink.closest("form"); $

Load magnific popup on page load

。_饼干妹妹 提交于 2019-12-11 09:09:46
问题 I'm working on a website, that would like to display a youtube video when someone opens the page (with a delay of 5 seconds) with magnific popup. This is the code that works (thanks to @Yoink!) setTimeout(function(){ $.magnificPopup.open({ items: { src: 'http://www.youtube.com/watch?v=0O2aH4XLbto' }, type: 'iframe' }); }, 5000) 回答1: It is working, you're binding the magnific popup to the class. If you were to change the div to an anchor link, it would open. If you're wanting the popup to