blueimp/Bootstrap-Image-Gallery — Issue #1: support for nested gallery item structure
Author: bartcc
Created: 2012-02-10 23:16:28+00:00
State: open

After updating to this version my gallery failed to work. Here is why:

My gallery items structure is rather deep and consists of list elements where each list element accommodates a div which itself receives a hidden anchor element with the relevant href attribute.

So:
link = $(e.target).closest(options.selector); // only searches upwards the DOM tree for a[rel=gallery] and therefor fails to work in my case

had to be changed into:
link = $(e.target).find(options.selector); // only searches downwards the DOM tree for a[rel=gallery] and may fail in some cases but works in my case

or preferably:
link = $(options.selector, e.target); // should work independently of the gallery item structure