Thanks Aaron - I saw that method but wasn't sure - however, in order
to add some links, I guess I need to download lightbox uncompressed
and change the default init method at the end of the script, right?
Moreover, I'm having some issues getting the script to run at all:
when initializing the script and there are no lightbox links at upon
loading the page, there is some stuff that gets not executed:
initialize: function(){
var args = Array.link(arguments, {options: Object.type, links:
Array.type});
this.setOptions(args.options);
var anchors = args.links || this.options.anchors;
if (this.options.autoScanLinks && !anchors) anchors = $$('a
[rel^='+this.options.relString+']');
if (!$$(anchors).length) return; //no links!
this.addAnchors(anchors);
if (this.options.useDefaultCss) this.addCss();
window.addEvent('domready', this.addHtmlElements.bind(this));
},
when adding links afterwards, there is no css and htmlElements have
not been created - if I put those two lines before if (!$$
(anchors).length) return; //no links!, lightbox opens but the the
loading spinner is just shown forever - still no image to see.
On Dec 29, 4:03 pm, Aaron Newton <[email protected]> wrote:
> look at the source; there's a addAnchors method...
>
>
>
> On Tue, Dec 29, 2009 at 3:26 PM, mmjaeger <[email protected]> wrote:
> > Hello
> > I've a page I like to use Lightbox - what I was wondering is how to
> > deal with lightbox links that get added to the page through ajax after
> > Lightbox has been initialized - I've seen some other lightbox scripts
> > that have kind of a "re-scan" method - as to the Clientcide Lightbox,
> > would I just reinitiate the Class or what's the best way to do this.
>
> > Thanks in advance for your input