Your Cart

Prevent Lightbox when clicking Button on LAYER

These forums are now closed to new replies / tickets.

Please open a support ticket from our new Support page.

Front Page Forums Questions Prevent Lightbox when clicking Button on LAYER

  • gravatar
    Dimi
    October 4, 2014 at 8:03 pm

    HI,

    I have lightbox enabled on galleria, however , i also have some
    buttons placed on top of galleria layer with :

    Galleria.run(‘.galleria’, {
    dataConfig: function(img) { return { layer:
    jQuery(img).next(‘div’).html() } } });

    where HTML content is (some styles amended , so short version)
    :

    $MyLikers.Count

    and JS code to fire on “rateme” class is :

    $(document).on(“click”,”.rateme”, function(event) { //
    event.stopPropagation(); //tried this // event.preventDefault();
    //tried this alert(‘TESTING’);

    });

    Idea is – there is a small square box for rating, but when I
    click it , instead of doing what i need it also fires a lightbox in
    parallel. How can I prevent lightbox from showing up when click is
    done on rating box ?

    Attachments:
    1. lightbox


    gravatar
    Dimi
    October 4, 2014 at 8:05 pm

    Oh, I see HTML didnt render correctly , where I tried to
    describe my HTML of the box itself, but ithink you’ve got my point
    from the image


    gravatar
    Nic
    August 23, 2015 at 12:51 pm

    Hi, I have now the same problem. If I click on the layer with
    the link, it also open the lightbox. I’m using JSON to serve data.
    How can I get out of it?

    var data = [
        {
            thumb: 'https://my.link/my-thumb.jpg',
            image: 'https://my.link/my-image.jpg',
            big: 'https://my.link/my-big-image.jpg',
            layer: '<div><h2>VEN01</h2><h6><a href="javascript:toggleCheck('VEN01')">Add to cart</a><h6></div>',
            layerFollow: 'true'
    
        },
    ];
    
    Attachments:
    1. Cart


Galleria.io uses cookies to store information. You can read more about that in our Privacy Policy. I understand