google-code-export / slideshow

Automatically exported from code.google.com/p/slideshow
0 stars 1 forks source link

loading data doesn't consider the target on the parent anchor #222

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
initialize function doesn't take into account the parent anchor's target. 
assigning because i'm not sure if we should commit here or github.

function should be updated to:
            if (!data){
                this.options.hu = '';
                data = {};
                var thumbnails = this.el.getElements(this.classes.get('thumbnails') + ' img');
                this.el.getElements(this.classes.get('images') + ' img').each(function(img, i){
                    var parent = img.getParent();
                    var src = img.src,
                        caption = img.alt || img.title,
                        target = parent.target,
                        href = parent.href,
                        thumbnail = thumbnails[i] ? thumbnails[i].src 
                            : '';
                        data[src] = {'caption': caption, 'href': href, 'thumbnail': thumbnail, 'target': target};
                });
            }

Original issue reported on code.google.com by gregory....@gmail.com on 2 Nov 2011 at 12:45