public/javascripts/yui/carousel/carousel-debug.js
function (parent) {
            var carousel = this,
                cfg,
                cssClass = carousel.CLASSES,
                el,
                i,
                j,
                nav,
                rv       = false;

            nav = Dom.getElementsByClassName(cssClass.PREV_PAGE, "*", parent);
            if (nav.length > 0) {
                for (i in nav) {
                    if (nav.hasOwnProperty(i)) {
                        el = nav[i];
                        YAHOO.log("Found Carousel previous page navigation - " +
                                el + (el.id ? " (#" + el.id + ")" : ""),
                                WidgetName);
                        if (el.nodeName == "INPUT" ||
                            el.nodeName == "BUTTON" ||
                            el.nodeName == "A") {// Anchor support in Nav (for SEO)
                            carousel._navBtns.prev.push(el);
                        } else {
                            j = el.getElementsByTagName("INPUT");
                            if (JS.isArray(j) && j.length > 0) {
                                carousel._navBtns.prev.push(j[0]);
                            } else {
                                j = el.getElementsByTagName("BUTTON");
                                if (JS.isArray(j) && j.length > 0) {
                                    carousel._navBtns.prev.push(j[0]);
                                }
                            }
                        }
                    }
                }
                cfg = { prev: nav };
            }

            nav = Dom.getElementsByClassName(cssClass.NEXT_PAGE, "*", parent);
            if (nav.length > 0) {
                for (i in nav) {
                    if (nav.hasOwnProperty(i)) {
                        el = nav[i];
                        YAHOO.log("Found Carousel next page navigation - " +
                                el + (el.id ? " (#" + el.id + ")" : ""),
                                WidgetName);
                        if (el.nodeName == "INPUT" ||
                            el.nodeName == "BUTTON" ||
                            el.nodeName == "A") {// Anchor support in Nav (for SEO)
                            carousel._navBtns.next.push(el);
                        } else {
                            j = el.getElementsByTagName("INPUT");
                            if (JS.isArray(j) && j.length > 0) {
                                carousel._navBtns.next.push(j[0]);
                            } else {
                                j = el.getElementsByTagName("BUTTON");
                                if (JS.isArray(j) && j.length > 0) {
                                    carousel._navBtns.next.push(j[0]);
                                }
                            }
                        }
                    }
                }
                if (cfg) {
                    cfg.next = nav;
                } else {
                    cfg = { next: nav };
                }
            }

            if (cfg) {
                carousel.set("navigation", cfg);
                rv = true;
            }

            return rv;
        }
function (parent) {
            var carousel = this,
                cfg,
                cssClass = carousel.CLASSES,
                el,
                i,
                j,
                nav,
                rv       = false;

            nav = Dom.getElementsByClassName(cssClass.PREV_PAGE, "*", parent);
            if (nav.length > 0) {
                for (i in nav) {
                    if (nav.hasOwnProperty(i)) {
                        el = nav[i];
                        YAHOO.log("Found Carousel previous page navigation - " +
                                el + (el.id ? " (#" + el.id + ")" : ""),
                                WidgetName);
                        if (el.nodeName == "INPUT" ||
                            el.nodeName == "BUTTON" ||
                            el.nodeName == "A") {// Anchor support in Nav (for SEO)
                            carousel._navBtns.prev.push(el);
                        } else {
                            j = el.getElementsByTagName("INPUT");
                            if (JS.isArray(j) && j.length > 0) {
                                carousel._navBtns.prev.push(j[0]);
                            } else {
                                j = el.getElementsByTagName("BUTTON");
                                if (JS.isArray(j) && j.length > 0) {
                                    carousel._navBtns.prev.push(j[0]);
                                }
                            }
                        }
                    }
                }
                cfg = { prev: nav };
            }

            nav = Dom.getElementsByClassName(cssClass.NEXT_PAGE, "*", parent);
            if (nav.length > 0) {
                for (i in nav) {
                    if (nav.hasOwnProperty(i)) {
                        el = nav[i];
                        YAHOO.log("Found Carousel next page navigation - " +
                                el + (el.id ? " (#" + el.id + ")" : ""),
                                WidgetName);
                        if (el.nodeName == "INPUT" ||
                            el.nodeName == "BUTTON" ||
                            el.nodeName == "A") {// Anchor support in Nav (for SEO)
                            carousel._navBtns.next.push(el);
                        } else {
                            j = el.getElementsByTagName("INPUT");
                            if (JS.isArray(j) && j.length > 0) {
                                carousel._navBtns.next.push(j[0]);
                            } else {
                                j = el.getElementsByTagName("BUTTON");
                                if (JS.isArray(j) && j.length > 0) {
                                    carousel._navBtns.next.push(j[0]);
                                }
                            }
                        }
                    }
                }
                if (cfg) {
                    cfg.next = nav;
                } else {
                    cfg = { next: nav };
                }
            }

            if (cfg) {
                carousel.set("navigation", cfg);
                rv = true;
            }

            return rv;
        }
function ( parent ) { var carousel = this , cfg , cssClass = carousel . CLASSES , el , i , j , nav , rv = false ; nav = Dom . getElementsByClassName ( cssClass . PREV_PAGE , "*" , parent ) ; if ( nav . length > 0 ) { for ( i in nav ) { if ( nav . hasOwnProperty ( i ) ) { el = nav [ i ] ; YAHOO . log ( "Found Carousel previous page navigation - " + el + ( el . id ? " (#" + el . id + ")" : "" ) , WidgetName ) ; if ( el . nodeName == "INPUT" || el . nodeName == "BUTTON" || el . nodeName == "A" ) { // Anchor support in Nav (for SEO) carousel . _navBtns . prev . push ( el ) ; } else { j = el . getElementsByTagName ( "INPUT" ) ; if ( JS . isArray ( j ) && j . length > 0 ) { carousel . _navBtns . prev . push ( j [ 0 ] ) ; } else { j = el . getElementsByTagName ( "BUTTON" ) ; if ( JS . isArray ( j ) && j . length > 0 ) { carousel . _navBtns . prev . push ( j [ 0 ] ) ; } } } } } cfg = { prev : nav } ; } nav = Dom . getElementsByClassName ( cssClass . NEXT_PAGE , "*" , parent ) ; if ( nav . length > 0 ) { for ( i in nav ) { if ( nav . hasOwnProperty ( i ) ) { el = nav [ i ] ; YAHOO . log ( "Found Carousel next page navigation - " + el + ( el . id ? " (#" + el . id + ")" : "" ) , WidgetName ) ; if ( el . nodeName == "INPUT" || el . nodeName == "BUTTON" || el . nodeName == "A" ) { // Anchor support in Nav (for SEO) carousel . _navBtns . next . push ( el ) ; } else { j = el . getElementsByTagName ( "INPUT" ) ; if ( JS . isArray ( j ) && j . length > 0 ) { carousel . _navBtns . next . push ( j [ 0 ] ) ; } else { j = el . getElementsByTagName ( "BUTTON" ) ; if ( JS . isArray ( j ) && j . length > 0 ) { carousel . _navBtns . next . push ( j [ 0 ] ) ; } } } } } if ( cfg ) { cfg . next = nav ; } else { cfg = { next : nav } ; } } if ( cfg ) { carousel . set ( "navigation" , cfg ) ; rv = true ; } return rv ; }
Find the Carousel navigation within a container. The navigation
elements need to match the carousel navigation class names.

@method parseCarouselNavigation
@param parent {HTMLElement} The parent element to look under
@return {Boolean} True if at least one is found, false otherwise
@protected
Find the Carousel navigation within a container . The navigation elements need to match the carousel navigation class names .