kpobococ/XtLightbox — Issue #18: Detaching element(s) from XtLightbox does not work
Author: ronaldbarendse
Created: 2012-03-02 08:35:41+00:00
State: open

When trying to detach an element from XtLightbox, you get an error because the `element.each` function is not correctly bound. Please fix this minor bug:

```js
detach: function(elements){
if (!instanceOf(elements, Elements)) elements = $$(elements);
elements.each(function(el){
this.elements.erase(el);
el.removeEvent('click', this.onElementClick);
delete el.$xtlightbox.adaptor;
}, this); // Just change this line
this.fireEvent('detach', elements);
return this;
}
```

Thanks!