Remove a lightwindow trigger link after an AJAX call
Well, this is the result of 2 days of head-banging with lightwindow:
Index: public/javascripts/lightwindow.js, line 444
_removeLink : function(removed) { // remove it from the links array // this.links = this.links.reject(function(link) { if (link == removed.href) return true; }); // remove it from the gallery links array // if (gallery = this._getGalleryInfo(removed.rel)) { klass = gallery[0]; name = gallery[1]; if (this.galleries[klass] && this.galleries[klass][name]) { this.galleries[klass][name] = this.galleries[klass][name].reject(function(link) { if (link == removed.href) return true; }); } } },
call this function from your .rjs template, something like this:
page << "myLightWindow._removeLink($('element').down('a.lightwindow'));"
More details to follow, when this work will be complete ;).
About this entry
You’re currently reading “Remove a lightwindow trigger link after an AJAX call”, an entry on sindro.me
- Published:
- 05.21.08 / 17PM
- Updated:
- 02.20.09 / 02AM
- Sections:
- development
- Tags: