patiek / gallerie

Gallerie is a simple JQuery plugin that offers a lightbox-like gallery viewer of a collection of images.
Other
15 stars 14 forks source link

gallerie replace all links #2

Open ghost opened 10 years ago

ghost commented 10 years ago

After clicking on a gallery, all link in the page open the gallery, making the site quite unusable.

Sample: http://bci.im/newnewton/

GeoffKe commented 6 years ago

Know it's a long time waiting but in the js file replace the commented out line as below fixes this

            load: function(elem){
                return this.each(function(){
                    var $this = $(this),
                        options = $this.data('gallerie')['options'];

                    if (elem === undefined) {
                        elem = options['elem'];
                    }

                    rebuildOverlay(this, $this.find(elem).toArray());

                    //$(document).on(options['imageEvent'] + '.gallerie', elem, function (e) {
                    $this.on(options['imageEvent'] + '.gallerie', elem, function(e){
                        $this.gallerie('open', this);
                        e.stopPropagation();
                        e.preventDefault();
                    });
                });
            },