I have added this code to MooFlow Viewer:

                if(cur.rel == 'html') { // if a...@rel=html], create a
div:last-child in div#mooflow
                        if(!$chk(this.htmlDesc)) { this.htmlDesc = new 
Element('div',
{'id': 'htmlDesc', 'class': 'show'}).setStyles
({'display':'none','opacity':'0'}).injectAfter(this.MooFlow); }
                                new Request.HTML({
                                        url: cur.href,
                                        method: 'get',
                                        update: 'htmlDesc',
                                        evalScripts: true,
                                        onComplete: function() {
                                                initializeTracklist();//#Move 
uotside of this file, better if in
main html.
                                                console.log('htmlDesc ajax 
loaded.');
                                        }
                                }).send();
                                
this.htmlDesc.setStyle('display','block').fade(1);
                        }

and I would like to launch the function initializeTracklist() when
Request.HTML has been completed.
Now it works, but I would like to move 'initializeTracklist();'
outside of MooFlowViewer.js file, better if in main html. Something
like:
a. an event listener that intercepts when console.log('htmlDesc ajax
loaded.') has been output and launches the function initializeTracklist
();
b. an event listener that intercepts when div#htmlDesc is created or
modified and launches the function initializeTracklist().

Thank you very much.

Reply via email to