Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1292965
    monstres
    Participant

    Hi,
    I’m opening my post using the essential grid lightbox.
    But when there is a link in the post it doesn’t work.

    I’ve try the advise you give by adding JS in the customizer but it doesn’t work either.
    like here :https://community.theme.co/forums/topic/open-new-tabs-from-link-in-ajax-lightbox-on-essential-grid/

    Thanks

    #1292970
    monstres
    Participant

    I’m also trying to open one of my item menu in a lightbox too but I do not find how to do.

    #1292981
    monstres
    Participant
    This reply has been marked as private.
    #1293474
    Rad
    Moderator

    Hi there,

    Thanks for writing in.

    Are you referring to the grid on the home page?

    Lightbox is working, but it’s just taking a while to appear because the lightbox content is pulled through ajax. Hence, the opening and loading speed is affected by the content size. Try clicking one item and wait, it will appear after few seconds.

    Let’s say the lightbox is downloading the content before it opens the popup, then the content downloads the images.

    Or are you referring to open in on new tab (window) instead of lightbox? They are different thing.

    Thanks!

    #1294026
    monstres
    Participant

    Hi,

    on the home page, in the essential grid, if you look at the project : Jazz Or Jazz, when it is open in the lightbox the link to the website (www.jazzorjazz.fr) at the bottom don’t open itself in au new tab, it just bring to the to of the light box.


    In the menu I want to open the video in the item “le studio” in a lightbox.

    Thks

    #1294696
    Rad
    Moderator

    Hi there,

    1. I see, first let’s fix the js error.

    Please change this custom javascript

     $(document).ready(function() {
    		$(".fancybox-media a").esgbox(
        		maxWidth    : 1000,
    		maxHeight   : 900,
    		fitToView   : true,
    		width       : '70%',
    		height      : '100%',
            padding     : [30,30,30,30],
    		autoSize    : false,
    		closeClick  : true,
    		openEffect  : 'none',
    		closeEffect : 'none'
          
        
        );
    	}); 

    to this

    jQuery( function($) {
     $(document).ready(function() {
    		$(".fancybox-media a").esgbox( {
        		maxWidth    : 1000,
    		maxHeight   : 900,
    		fitToView   : true,
    		width       : '70%',
    		height      : '100%',
            padding     : [30,30,30,30],
    		autoSize    : false,
    		closeClick  : true,
    		openEffect  : 'none',
    		closeEffect : 'none'
          
        }
        );
    	}); 
    } );

    And add this to fix the link opening in new tab

    jQuery( function($){ 
    
    $(document).on('click', '.btn-blank-window', function(e){ e.stopPropagation(); } );
    
    } );

    The link should have btn-blank-window class.

    2. Please check this http://www.mhthemes.com/support/open-wordpress-menu-items-in-new-tab/

    Hope this helps.

    #1295473
    monstres
    Participant

    Ok Thanks,
    1° works fine. The code below solve my problem.

    jQuery( function($){ 
    
    $(document).on('click', '.btn-blank-window', function(e){ e.stopPropagation(); } );
    
    } );

    2° does not answer my question, but i’ve replace the JS by :

    jQuery( function($) {
     $(document).ready(function() {
    		$(".fancybox-media a").esgbox( {
       
    		openEffect  : 'none',
    		closeEffect : 'none',
       helpers : {
    			media : {}
    		}
          
        }
        );
    	}); 
    } );
    

    the item menu “le studio” open itself in a lightbox by adding the class “fancybox-media” to the item.

    So thanks !
    and have a good day.

    #1295557
    Paul R
    Moderator

    You’re welcome! 🙂

  • <script> jQuery(function($){ $("#no-reply-1292965 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>