{"action":"closed","issue":{"url":"https://api.github.com/repos/jackmoore/colorbox/issues/769","labels_url":"https://api.github.com/repos/jackmoore/colorbox/issues/769/labels{/name}","comments_url":"https://api.github.com/repos/jackmoore/colorbox/issues/769/comments","events_url":"https://api.github.com/repos/jackmoore/colorbox/issues/769/events","html_url":"https://github.com/jackmoore/colorbox/issues/769","id":127480341,"number":769,"title":"gallery array length miscalculated","user":{"login":"youngmicroserf","id":6634906,"avatar_url":"https://avatars.githubusercontent.com/u/6634906?v=3","gravatar_id":"","url":"https://api.github.com/users/youngmicroserf","html_url":"https://github.com/youngmicroserf","followers_url":"https://api.github.com/users/youngmicroserf/followers","following_url":"https://api.github.com/users/youngmicroserf/following{/other_user}","gists_url":"https://api.github.com/users/youngmicroserf/gists{/gist_id}","starred_url":"https://api.github.com/users/youngmicroserf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youngmicroserf/subscriptions","organizations_url":"https://api.github.com/users/youngmicroserf/orgs","repos_url":"https://api.github.com/users/youngmicroserf/repos","events_url":"https://api.github.com/users/youngmicroserf/events{/privacy}","received_events_url":"https://api.github.com/users/youngmicroserf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-19T16:10:15Z","updated_at":"2016-01-20T00:35:27Z","closed_at":"2016-01-20T00:35:27Z","body":"Hi -\r\n\r\nI'm opening a colorbox gallery via a separate link as explained in the FAQ. It works fine, except that, for some reason, the opened colorbox always gives a gallery array length that exceeds the actual amount of rel=\"abc\" selectors. Say there's three anchors and images in the document with the respective selector, then the opened colorbox will have an array of five images, the first two being added again at the end of the array.\r\n\r\nThis is the code I'm using to call the gallery (on a touchswipe-slider \"tap\" event) -\r\n\r\n`var $gallery = jQuery(\"a[rel=gal_link]\").colorbox();\r\n$gallery.eq(0).click();`\r\n\r\nAnd this is the selector code - \r\n\r\n`<a class=\"cboxgrouped cboxElement\" rel=\"gal_link\" href=\"'.$image_full[0].'\"><img src=\"'.$image_medium[0].'\" alt=\".$caption.\" title=\"'.$caption.'\" /></a>`\r\n\r\nIs this a bug? I assume I'm doing something wrong, maybe someone has an idea how to fix this problem.\r\n\r\nThanks!"}}