WordPress.org

Ready to get started?Download WordPress

Forums

Lightbox Plus Colorbox
[resolved] Blinking Close Button (13 posts)

  1. Jbyrd117
    Member
    Posted 1 year ago #

    All of my plugins, as well as WordPress are up to date.

    When an image is viewed in the lightbox the "x" at the top right corner of the lightbox flashes/blinks repeatedly.

    It can be seen here: http://vanhoutenillustration.com/portfolio/illustration/

    Just click on one of the pictures and you'll see what I'm talking about.

    Thanks for the help!

    http://wordpress.org/extend/plugins/lightbox-plus/

  2. tzdk
    Member
    Posted 1 year ago #

    Change duration from 0 to 1/1000sec. in helper.js - or that works for me. Seems like some weird jquery workarounds dev. need to look at. 1/1000sec make no sense but take away the blinking. Anything but zero.

    You have already moved styles to custom folder so easy for you to change last 0 to 1 or above. Is last part with "Show close button with a delay" comment.

    jQuery(document).ready(function($){
    
        $(document).bind('cbox_open', function () {
            // Hide close button initially.
            $('#cboxClose').css('opacity', 0);
        });
        $(document).bind('cbox_load', function () {
            // Hide close button. (It doesn't handle the load animation well.)
            $('#cboxClose').css('opacity', 0);
        });
        $(document).bind('cbox_complete', function () {
            // Show close button with a delay. So he says but 0 is not much of a delay! 0 = disable duration. 1/1000sec is better.
            $('#cboxClose').fadeTo('fast', 1, function () {$(this).css('opacity', 1)});
        });
    });

    I hope you can reproduce fix. But dont click resolved if you can do that. Dev. needs to see this I think.

    .fadeTo doc http://api.jquery.com/fadeTo/

  3. webcraftuk
    Member
    Posted 1 year ago #

    Hi

    I also have this problem on a site I am putting together but do not understand the fix - I cannot find a helper.js file anywhere.

  4. tzdk
    Member
    Posted 1 year ago #

    Lets see how much of a fix it is but works for me.

    Well file is part of 3 themes:

    Fancypants
    Stockholm
    Overtext

    So you use one of those.

    After inspection Overtexts helper.js does not include this code so you use Fancypants or Stockholm.

    If you use Fancypants file will be located here

    /wp-content/lightbox-plus/css/fancypants/helper.js

    All themes are under /css/ folder. When you select a theme in settings you kind of select a folder as well.

    You can copy/move all themes in to own folder so modifications wont get lost from an update. Check FAQ "Can I add my own styles and images for the overlay?" But its just that 1 change apparently.

    I only checked Fancypants btw.

  5. webcraftuk
    Member
    Posted 1 year ago #

    Ah! (lightbulb)!

    I was looking in the wrong place for the helper.js file.

    (And I was using Fancypants).

    Found it now and the fix has worked. Thanks very much for this.

  6. tzdk
    Member
    Posted 1 year ago #

    Well I was also telling you to look the wrong place, heh

    /wp-content/lightbox-plus/css/fancypants/helper.js

    "/plugins/" should be put in there.

  7. Jbyrd117
    Member
    Posted 1 year ago #

    I edit the helper.js from my custom fancypants style right?
    I edited it like how you showed, replacing 0 with 1.
    I cleared the cache on my site and it's still blinking. Maybe it's just me. You can look at my site again and see if it's still doing it. I don't replace 0 with 1/1000 right? I just change it to 1?

    I'm wondering if I'll have to change the actual default fancypants helper.js now :\

    Thanks for the help so far.

  8. tzdk
    Member
    Posted 1 year ago #

    Dont know where you are right now but

    http://vanhoutenillustration.com/wordpress/wp-content/lbp-css/fancypants2/helper.js

    is what I see active and that says "0" not "1".

    Clear W3TC cache? Like again? But as Admin you should not see cache at all - unless you have disabled that feature. You dont even seem to have minify turned but I am just saying W3TC hoping it help ;)

    File is the right one, only helper.js I see is from your custom /lbp-css/fancypants2/ folder.

    Well as of this second it says 0 and then I would also see evil blink.

    $('#cboxClose').fadeTo('fast', 0, function () {$(this).css('opacity', 1)});

  9. Jbyrd117
    Member
    Posted 1 year ago #

    I re-saved the code and I cleared the cache from W3TC a couple more times as well as the CloudFlare cache. I think the CloudFlare cache is what wouldn't let me see the update.
    It still flashes when I view it while logged in but when I look at the gallery in Incognito Mode it looks fine. So I'm assuming that it's probably fixed.

    I won't mark this thread as resolved like you suggested so that the developer will know about this issue.

    Thanks for all of the help.

  10. tzdk
    Member
    Posted 1 year ago #

    Just so happens devs. own demo page use Fancypants http://www.23systems.net/wordpress-plugins/lightbox-plus-for-wordpress/demos/ and buttons are blinking full force. So eventually he will go WTF - and fix :)

  11. Dan Zappone
    Member
    Plugin Author

    Posted 1 year ago #

    Wait, no, the blinking is a feature.

    No seriously, you should be able to do this until I release the next update:

    helper.js for Fancypants and Stockholm

    jQuery(document).ready(function($){
        $(document).bind('cbox_open', function () {
            // Hide close button initially.
            $('#cboxClose').css('opacity', 0);
        });
        $(document).bind('cbox_complete', function () {
            // Show close button with a delay.
            $('#cboxClose').show('fast', 0, function () {$(this).css('opacity', 1)});
        });
    });

    helper.js for Overtext

    jQuery(document).ready(function($){
        // Only run if there is a title.
        if ($('#cboxTitle:empty').length == false) {
            setTimeout(function () { $('#cboxTitle').slideUp() }, 1500);
            $('#cboxLoadedContent img').bind('mouseover', function () {
                $('#cboxTitle').slideDown();
            });
            $('#cboxOverlay').bind('mouseover', function () {
                $('#cboxTitle').slideUp();
            });
        }
        else {
            $('#cboxTitle').hide();
        }
    });
  12. Jbyrd117
    Member
    Posted 1 year ago #

    Should I completely replace the code in my helper.js with that code?

    In mine there is a part that is left out of your new code.

    $(document).bind('cbox_load', function () {
            // Hide close button. (It doesn't handle the load animation well.)
            $('#cboxClose').css('opacity', 0);
        });
  13. Dan Zappone
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry for the delay had the flu. 2.6 update should have the fixes at this point.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic