featherlight.js

Disable prettyPhoto WordPress (Visual Composer)

試著忘記壹切 提交于 2020-01-01 09:04:11
问题 Hi I'm trying to get WP Featherlight setup as the default lightbox, right now Visual Composer is using prettyPhoto. So I need to disable it, so that WP Featherlight will overwrite it. I asked wpbakery and I got this response. Hello, you can actually overwrite prettyphoto by adding prettyPhoto() in your functions.php and call another lightbox. And from the plug-in author I got this: Once prettyPhoto has been disabled, you shouldn't need to do anything else to lightbox images on the site. So it

Can't change / get value of input after being opened with FeatherLight?

旧时模样 提交于 2019-12-24 21:10:09
问题 I've met a weird behavior. I'm trying to get / set the value of an input textbox After FeatherLight lightbox is closed. I get "Undefined" when trying to fetch the value of the textbox (again, after it was opened and closed via Featherlight). You can see my source code here: https://jsfiddle.net/hgyba4dg/ The only relevant part is the html code. try running the code on JSFiddle and see the input's value (the textbox's value). You'll see that you'll get "undefined" after closing the

How to open a lightbox on page load if url equals using google tag manager

会有一股神秘感。 提交于 2019-12-13 07:52:32
问题 The title pretty much says it. I would like to show a lightbox on page load only if the url is www.example.com/#popup versus www.example.com If this could be accomplished with google tag manager that would be grand I've see bits and pieces of this but I'm having trouble piecing it all together. HTML: <a href="#" data-featherlight="#mylightbox">Open element in lightbox</a> <div id="mylightbox">This div will be opened in a lightbox</div> 回答1: if (window.location.hash == "#popup") { $

Lightbox only show's first image

穿精又带淫゛_ 提交于 2019-12-13 02:55:33
问题 I'm currently working on a website with a lightbox. (Featherlight) Now the problem is, the lightbox only load's the first image, even when I click on another image, it still show's the first. You can try it yourself over here The code I used is <div class="grid-sizer"></div> <?php if($page->numChildren(true)) { echo "<ul class='project'>"; foreach($page->children as $child) { if ($child->head_image) { $image = $child->head_image; echo "<li class='item'><a href='#' data-featherlight='

Disable prettyPhoto WordPress (Visual Composer)

两盒软妹~` 提交于 2019-12-04 03:50:37
Hi I'm trying to get WP Featherlight setup as the default lightbox, right now Visual Composer is using prettyPhoto. So I need to disable it, so that WP Featherlight will overwrite it. I asked wpbakery and I got this response. Hello, you can actually overwrite prettyphoto by adding prettyPhoto() in your functions.php and call another lightbox. And from the plug-in author I got this: Once prettyPhoto has been disabled, you shouldn't need to do anything else to lightbox images on the site. So it's pretty clear what I need to do. Disable prettyPhoto. But I don't know how to do that. Can I add a

Custom attribute requiring double click (featherlight lightbox)

落爺英雄遲暮 提交于 2019-12-02 03:02:56
问题 So, here is the jsfiddle: Here is the link to the plugin (featherlight lightbox) The issue is that using the default targetAttr (which is data-featherlight ), it works with only one click. However, with a custom targetAttr (such as data-single in this example), I have to click twice before the lightbox opens. Could someone help me out why it is doing it? Thank you. 回答1: featherlight() has a build-in click trigger so you just need to call the plugin directly: jQuery('.something_else')