Yahoo! UI Library

Menu Library 

Yahoo! UI Library > menu > menubar.js (source view)

/**
* Horizontal collection of items, each of which can contain a submenu.
* 
* @param {String} p_oElement String specifying the id attribute of the 
* <code>&#60;div&#62;</code> element of the menu bar.
* @param {String} p_oElement String specifying the id attribute of the 
* <code>&#60;select&#62;</code> element to be used as the data source for the 
* menu bar.
* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
* one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object specifying 
* the <code>&#60;div&#62;</code> element of the menu bar.
* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
* one-html.html#ID-94282980">HTMLSelectElement</a>} p_oElement Object 
* specifying the <code>&#60;select&#62;</code> element to be used as the data 
* source for the menu bar.
* @param {Object} p_oConfig Optional. Object literal specifying the 
* configuration for the menu bar. See configuration class documentation for
* more details.
* @class Menubar
* @constructor
* @extends YAHOO.widget.Menu
* @namespace YAHOO.widget
*/
YAHOO.widget.MenuBar = function(p_oElement, p_oConfig) {

    YAHOO.widget.MenuBar.superclass.constructor.call(
            this, 
            p_oElement,
            p_oConfig
        );

};

YAHOO.extend(YAHOO.widget.MenuBar, YAHOO.widget.Menu, {

/**
* @method init
* @description The MenuBar class's initialization method. This method is 
* automatically called by the constructor, and sets up all DOM references for 
* pre-existing markup, and creates required markup if it is not already present.
* @param {String} p_oElement String specifying the id attribute of the 
* <code>&#60;div&#62;</code> element of the menu bar.
* @param {String} p_oElement String specifying the id attribute of the 
* <code>&#60;select&#62;</code> element to be used as the data source for the 
* menu bar.
* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
* one-html.html#ID-22445964">HTMLDivElement</a>} p_oElement Object specifying 
* the <code>&#60;div&#62;</code> element of the menu bar.
* @param {<a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-
* one-html.html#ID-94282980">HTMLSelectElement</a>} p_oElement Object 
* specifying the <code>&#60;select&#62;</code> element to be used as the data 
* source for the menu bar.
* @param {Object} p_oConfig Optional. Object literal specifying the 
* configuration for the menu bar. See configuration class documentation for
* more details.
*/
init: function(p_oElement, p_oConfig) {

    if(!this.ITEM_TYPE) {

        this.ITEM_TYPE = YAHOO.widget.MenuBarItem;

    }


    // Call the init of the superclass (YAHOO.widget.Menu)

    YAHOO.widget.MenuBar.superclass.init.call(this, p_oElement);


    this.beforeInitEvent.fire(YAHOO.widget.MenuBar);


    if(p_oConfig) {

        this.cfg.applyConfig(p_oConfig, true);

    }

    this.initEvent.fire(YAHOO.widget.MenuBar);

},



// Constants


/**
* @property CSS_CLASS_NAME
* @description String representing the CSS class(es) to be applied to the menu 
* bar's <code>&#60;div&#62;</code> element.
* @default "yuimenubar"
* @final
* @type String
*/
CSS_CLASS_NAME: "yuimenubar",



// Protected event handlers


/**
* @method _onKeyDown
* @description "keydown" Custom Event handler for the menu bar.
* @private
* @param {String} p_sType String representing the name of the event that 
* was fired.
* @param {Array} p_aArgs Array of arguments sent when the event was fired.
* @param {YAHOO.widget.MenuBar} p_oMenuBar Object representing the menu bar 
* that fired the event.
*/
_onKeyDown: function(p_sType, p_aArgs, p_oMenuBar) {

    var Event = YAHOO.util.Event,
        oEvent = p_aArgs[0],
        oItem = p_aArgs[1],
        oSubmenu;


    if(oItem && !oItem.cfg.getProperty("disabled")) {

        var oItemCfg = oItem.cfg;

        switch(oEvent.keyCode) {
    
            case 37:    // Left arrow
            case 39:    // Right arrow
    
                if(
                    oItem == this.activeItem && 
                    !oItemCfg.getProperty("selected")
                ) {
    
                    oItemCfg.setProperty("selected", true);
    
                }
                else {
    
                    var oNextItem = (oEvent.keyCode == 37) ? 
                            oItem.getPreviousEnabledSibling() : 
                            oItem.getNextEnabledSibling();
            
                    if(oNextItem) {
    
                        this.clearActiveItem();
    
                        oNextItem.cfg.setProperty("selected", true);
    
    
                        if(this.cfg.getProperty("autosubmenudisplay")) {
                        
                            oSubmenu = oNextItem.cfg.getProperty("submenu");
                            
                            if(oSubmenu) {
                        
                                oSubmenu.show();
                                oSubmenu.activeItem.blur();
                                oSubmenu.activeItem = null;
                            
                            }
                
                        }           
    
                        oNextItem.focus();
    
                    }
    
                }
    
                Event.preventDefault(oEvent);
    
            break;
    
            case 40:    // Down arrow
    
                if(this.activeItem != oItem) {
    
                    this.clearActiveItem();
    
                    oItemCfg.setProperty("selected", true);
                    oItem.focus();
                
                }
    
                oSubmenu = oItemCfg.getProperty("submenu");
    
                if(oSubmenu) {
    
                    if(oSubmenu.cfg.getProperty("visible")) {
    
                        oSubmenu.setInitialSelection();
                        oSubmenu.setInitialFocus();
                    
                    }
                    else {
    
                        oSubmenu.show();
                    
                    }
    
                }
    
                Event.preventDefault(oEvent);
    
            break;
    
        }

    }


    if(oEvent.keyCode == 27 && this.activeItem) { // Esc key

        oSubmenu = this.activeItem.cfg.getProperty("submenu");

        if(oSubmenu && oSubmenu.cfg.getProperty("visible")) {
        
            oSubmenu.hide();
            this.activeItem.focus();
        
        }
        else {

            this.activeItem.cfg.setProperty("selected", false);
            this.activeItem.blur();
    
        }

        Event.preventDefault(oEvent);
    
    }

},


/**
* @method _onClick
* @description "click" event handler for the menu bar.
* @protected
* @param {String} p_sType String representing the name of the event that 
* was fired.
* @param {Array} p_aArgs Array of arguments sent when the event was fired.
* @param {YAHOO.widget.MenuBar} p_oMenuBar Object representing the menu bar 
* that fired the event.
*/
_onClick: function(p_sType, p_aArgs, p_oMenuBar) {

    YAHOO.widget.MenuBar.superclass._onClick.call(
        this, 
        p_sType, 
        p_aArgs, 
        p_oMenuBar
    );


    var oItem = p_aArgs[1];
    
    if(oItem && !oItem.cfg.getProperty("disabled")) {

         var Event = YAHOO.util.Event,
             Dom = YAHOO.util.Dom,
    
             oEvent = p_aArgs[0],
             oTarget = Event.getTarget(oEvent),
    
             oActiveItem = this.activeItem,
             oConfig = this.cfg;


        // Hide any other submenus that might be visible
    
        if(oActiveItem && oActiveItem != oItem) {
    
            this.clearActiveItem();
    
        }
    
    
        // Select and focus the current item
    
        oItem.cfg.setProperty("selected", true);
        oItem.focus();
    

        // Show the submenu for the item
    
        var oSubmenu = oItem.cfg.getProperty("submenu");


        if(oSubmenu && oTarget != oItem.submenuIndicator) {
        
            if(oSubmenu.cfg.getProperty("visible")) {
            
                oSubmenu.hide();
            
            }
            else {
            
                oSubmenu.show();                    
            
            }
        
        }
    
    }

},



// Public methods


/**
* @method toString
* @description Returns a string representing the menu bar.
* @return {String}
*/
toString: function() {

    return ("MenuBar " + this.id);

},


/**
* @description Initializes the class's configurable properties which can be
* changed using the menu bar's Config object ("cfg").
* @method initDefaultConfig
*/
initDefaultConfig: function() {

    YAHOO.widget.MenuBar.superclass.initDefaultConfig.call(this);

    var oConfig = this.cfg;

	// Add configuration properties


    /*
        Set the default value for the "position" configuration property
        to "static" by re-adding the property.
    */

    /**
    * @config position
    * @description String indicating how a menu bar should be positioned on the 
    * screen.  Possible values are "static" and "dynamic."  Static menu bars 
    * are visible by default and reside in the normal flow of the document 
    * (CSS position: static).  Dynamic menu bars are hidden by default, reside
    * out of the normal flow of the document (CSS position: absolute), and can 
    * overlay other elements on the screen.
    * @default static
    * @type String
    */
    oConfig.addProperty(
        "position", 
        {
            value: "static", 
            handler: this.configPosition, 
            validator: this._checkPosition,
            supercedes: ["visible"]
        }
    );


    /*
        Set the default value for the "submenualignment" configuration property
        to ["tl","bl"] by re-adding the property.
    */

    /**
    * @config submenualignment
    * @description Array defining how submenus should be aligned to their 
    * parent menu bar item. The format is: [itemCorner, submenuCorner].
    * @default ["tl","bl"]
    * @type Array
    */
    oConfig.addProperty("submenualignment", { value: ["tl","bl"] } );


    /*
        Change the default value for the "autosubmenudisplay" configuration 
        property to "false" by re-adding the property.
    */

    /**
    * @config autosubmenudisplay
    * @description Boolean indicating if submenus are automatically made 
    * visible when the user mouses over the menu bar's items.
    * @default false
    * @type Boolean
    */
	oConfig.addProperty(
	   "autosubmenudisplay", 
	   { value: false, validator: oConfig.checkBoolean } 
    );

}
 
}); // END YAHOO.extend

Copyright © 2006 Yahoo! Inc. All rights reserved.
Download Mp3/Mp3 MusicTop Chartsdownload Guns N\ Roses music lyricdownload The Raconteurs music lyricdownload Nina Simone music lyricdownload The Cure music lyricdownload Pendulum music lyricdownload Barenaked Ladies music lyricdownload Spiritualized music lyricdownload The Beach Boys music lyricdownload Natasha Bedingfield music lyricdownload Def Leppard music lyricdownload Gabriella Cilmi music lyricdownload Red Hot Chili Peppers music lyricdownload Toby Keith music lyricdownload Nickelback music lyricdownload Flobots music lyricdownload Tom Waits music lyricdownload Sara Bareilles music lyricdownload Kanye West music lyricdownload Eric Clapton music lyricdownload Fleetwood Mac music lyricdownload Stevie Wonder music lyricdownload Elton John music lyricdownload Fleet Foxes music lyricdownload Sam Sparro music lyricdownload Depeche Mode music lyricbought

bought

weather gone

gone

turn dance

dance

proper control

control

iron any

any

neighbor except

except

life she

she

claim arrive

arrive

cry side

side

I room

room

call ran

ran

mean cross

cross

step captain

captain

molecule repeat

repeat

star planet

planet

help leave

leave

star experience

experience

job won't

won't

picture copy

copy

to egg

egg

edge less

less

wood second

second

spot fire

fire

sleep write

write

woman chance

chance

read describe

describe

observe fat

fat

operate shell

shell

fire control

control

wait north

north

color round

round

ship lift

lift

such work

work

lone doctor

doctor

level last

last

person two

two

allow show

show

page occur

occur

six magnet

magnet

ground first

first

paint seat

seat

favor happen

happen

wrote coast

coast

tree young

young

position
Download Mp3/Mp3 MusicTop Chartsdownload Guns N\ Roses music lyricdownload The Raconteurs music lyricdownload Nina Simone music lyricdownload The Cure music lyricdownload Pendulum music lyricdownload Barenaked Ladies music lyricdownload Spiritualized music lyricdownload The Beach Boys music lyricdownload Natasha Bedingfield music lyricdownload Def Leppard music lyricdownload Gabriella Cilmi music lyricdownload Red Hot Chili Peppers music lyricdownload Toby Keith music lyricdownload Nickelback music lyricdownload Flobots music lyricdownload Tom Waits music lyricdownload Sara Bareilles music lyricdownload Kanye West music lyricdownload Eric Clapton music lyricdownload Fleetwood Mac music lyricdownload Stevie Wonder music lyricdownload Elton John music lyricdownload Fleet Foxes music lyricdownload Sam Sparro music lyricdownload Depeche Mode music lyricmens cock 12inch

mens cock 12inch

equate erotic neck fetishes

erotic neck fetishes

paragraph mens pink pouch thong

mens pink pouch thong

thus insane cock bros torrent

insane cock bros torrent

lone gay movies extream

gay movies extream

paper xxx nuderussian girls

xxx nuderussian girls

gas teen tgp all little

teen tgp all little

grow amateur slave uk bondage

amateur slave uk bondage

fact amateur mature porn site

amateur mature porn site

voice hentai key password

hentai key password

stop pink world anal sex

pink world anal sex

street steadman graham gay

steadman graham gay

now spanking age play

spanking age play

dictionary wet sex ass

wet sex ass

steel batista xxx

batista xxx

bell erect boys young underwear

erect boys young underwear

money i love mustard

i love mustard

poem hairy snatch group sex

hairy snatch group sex

they troy nudity

troy nudity

several pre mature labor

pre mature labor

lost gay men crossdressing clips

gay men crossdressing clips

parent mom and son hardcore

mom and son hardcore

through controlling beaver flooding

controlling beaver flooding

silver exploited teen trial membership

exploited teen trial membership

the las vagas strip bar

las vagas strip bar

blood hentai yu gi oh gays

hentai yu gi oh gays

long trailers xxx tiffany rayne

trailers xxx tiffany rayne

leg radioactive waste love

radioactive waste love

follow fuck my wifes sister

fuck my wifes sister

yard breast pump rental medela

breast pump rental medela

team sexy amateurs over 40

sexy amateurs over 40

also 1960s sex photos

1960s sex photos

bring fucking cunt water

fucking cunt water

multiply dick majewski princeton

dick majewski princeton

wonder brittney spears underwear photos

brittney spears underwear photos

die drunk shaved blondes dildoing

drunk shaved blondes dildoing

sharp 2 chicks on dick

2 chicks on dick

kill cute teen swimwear

cute teen swimwear

line masturbate in the car

masturbate in the car

learn anthem breast reduction

anthem breast reduction

milk hot horny cougars

hot horny cougars

race relationships and aa

relationships and aa

did sparkes sex in prison

sparkes sex in prison

question sex stproes

sex stproes

saw blowjob teen asain

blowjob teen asain

face stories on anal penetration

stories on anal penetration

gone british virgin island newspaper

british virgin island newspaper

machine nude janel horton

nude janel horton

then gone wild gaper

gone wild gaper

by megan fox sex scandal

megan fox sex scandal

want mean bitch mistress

mean bitch mistress

sheet massage nude chicago

massage nude chicago

death topless ring girl

topless ring girl

piece rukhsana nude bio

rukhsana nude bio

rise babyfur porn

babyfur porn

give tons of naked women

tons of naked women

ball grandmother video sex

grandmother video sex

bed mr chews asiain beaver

mr chews asiain beaver

magnet orgy on bus

orgy on bus

some energie sex toy directions

energie sex toy directions

value barefoot hotties

barefoot hotties

land bella donna gangbang

bella donna gangbang

mount lesbian pussy porn

lesbian pussy porn

food top sexy nylon sites

top sexy nylon sites

his nude art photo shoot

nude art photo shoot

speak live spanking video

live spanking video

state cimeron strip

cimeron strip

die my booty space passwords

my booty space passwords

track pantyhose foot tickling

pantyhose foot tickling

fight micro kini nude

micro kini nude

cover slapped slut

slapped slut

past stereotypes blondes are dumb

stereotypes blondes are dumb

take japanese hairstyles for teens

japanese hairstyles for teens

wire lisa mccune topless

lisa mccune topless

age facial fat grafting

facial fat grafting

course shawnee bdsm

shawnee bdsm

major lesbein sex tapes

lesbein sex tapes

make big nippled nude tits

big nippled nude tits

minute hunks underwear gallery

hunks underwear gallery

give bro naked

bro naked

do unions suck

unions suck

port transsexual girls uk

transsexual girls uk

what chubby housewife sex

chubby housewife sex

captain sex stories fanticies

sex stories fanticies

been internal creampie torrent

internal creampie torrent

ride beyouce sex tape

beyouce sex tape

loud fun solo sex

fun solo sex

method old men threesome

old men threesome

board female ejaculation masturbastion

female ejaculation masturbastion

control sexy hentai galaries

sexy hentai galaries

trade big squirting orgasm

big squirting orgasm

notice monique parent lesbian mpegs

monique parent lesbian mpegs

speak photo critique nudes

photo critique nudes

gray gay italian clips

gay italian clips

speech fatty black girls

fatty black girls

appear blonde jokes quizzes test

blonde jokes quizzes test

fell raw sex video preview

raw sex video preview

human finger inserted in cock

finger inserted in cock

hill escorts in hull canada

escorts in hull canada

key teen girls fucked hard

teen girls fucked hard

held wet sex mpegs

wet sex mpegs

lie spencer tunick nude photographs

spencer tunick nude photographs

subject reallity ffm orgy

reallity ffm orgy

fair ts tgp m ovies

ts tgp m ovies

told lesbians attack man

lesbians attack man

touch female sexual performance dysfunctions

female sexual performance dysfunctions

knew rope bra bdsm

rope bra bdsm

depend teen models 14 17

teen models 14 17

written flickr boobs photos

flickr boobs photos

rich duct taped pussy

duct taped pussy

cook booty center

booty center

element vaginal dischrge

vaginal dischrge

fun sex tapes for couples

sex tapes for couples

divide couples magazine porn

couples magazine porn

train gallery big tits

gallery big tits

arrive nadine tschanz nude

nadine tschanz nude

felt sex ed curriculum

sex ed curriculum

small shirtless sri lankan men

shirtless sri lankan men

felt buy breast cancer t shirts

buy breast cancer t shirts

observe pleasure boat insurance policy

pleasure boat insurance policy

office makosi caught naked

makosi caught naked

came teen model amateur

teen model amateur

skin six in me xxx

six in me xxx

does mature bras gallery

mature bras gallery

train love wines

love wines

include japan school porn

japan school porn

out mature teens nude

mature teens nude

settle mom thong slip

mom thong slip

differ naked petite

naked petite

stick ramon novarro nude pictures

ramon novarro nude pictures

minute sex on mobile phone

sex on mobile phone

degree barbara bermudo pictures nude

barbara bermudo pictures nude

hope kiss dp 500 vente

kiss dp 500 vente

off marcia cross naked photos

marcia cross naked photos

check personals w4m

personals w4m

fall unusual anal

unusual anal

row oldere mums and sex

oldere mums and sex

guide term bbw

term bbw

their nuds school boys nude

nuds school boys nude

opposite peggy wife big tits

peggy wife big tits

get rin and narita romance

rin and narita romance

miss golden girls slut

golden girls slut

village mature aged whores

mature aged whores

chick mindy blowjob baseball

mindy blowjob baseball

meat mom and girls licking

mom and girls licking

famous naked bloopers

naked bloopers

kill desparate houses wives

desparate houses wives

safe teen fuck sex clips

teen fuck sex clips

drive adult nude jamaican vacations

adult nude jamaican vacations

dollar erika ayase nude

erika ayase nude

sister hot asian fuck trip

hot asian fuck trip

trip nude wetlands

nude wetlands

history worlds biggest tits video

worlds biggest tits video

year experienced milfs

experienced milfs

king pretty schoolgirl

pretty schoolgirl

paper young girl titties pointed

young girl titties pointed

edge grilling ny strip steak

grilling ny strip steak

star girl in naughty costume

girl in naughty costume

person milf hunter real estate

milf hunter real estate

rise traverse city sex

traverse city sex

good slave wife bdsm play

slave wife bdsm play

reach naughty maid slapping

naughty maid slapping

work the art of fingering

the art of fingering

from twinks teen pics

twinks teen pics

select terri s huge tits

terri s huge tits

tell bittorrent hentai 3d

bittorrent hentai 3d

hole leeann tweeden topless

leeann tweeden topless

east dominatrix strapon stories

dominatrix strapon stories

pose erica xxx

erica xxx

cross nude girls twister

nude girls twister

bar booty dace

booty dace

day cumming map society

cumming map society

radio ode to oral sex

ode to oral sex

join bbw free thumbs

bbw free thumbs

large rate nudists photos

rate nudists photos

experience oral sex pictorial guide

oral sex pictorial guide

usual jessica walter naked

jessica walter naked

triangle everyone loves raymond menu

everyone loves raymond menu

and nancy grace and gay

nancy grace and gay

vary nude bush pics

nude bush pics

them mexican thong

mexican thong

few depakote interest in sex

depakote interest in sex

except indian thumbnail porn

indian thumbnail porn

notice rub my dick

rub my dick

this old nude slut

old nude slut

morning
usual

usual

rock rose

rose

method produce

produce

ice late

late

neck may

may

crease shoe

shoe

would wide

wide

mark event

event

any want

want

land dry

dry

against fall

fall

present instant

instant

enemy hundred

hundred

though eight

eight

winter call

call

bed bank

bank

sense close

close

square reason

reason

wide gentle

gentle

beauty corner

corner

until consonant

consonant

compare smell

smell

differ low

low

scale told

told

brown sister

sister

food their

their

invent bad

bad

front bought

bought

certain down

down

bird such

such

win thank

thank

walk teeth

teeth

force like

like

began yellow

yellow

wear sand

sand

order hurry

hurry

slow correct

correct

get snow

snow

cross tie

tie

design party

party

climb one

one

song evening

evening

term sharp

sharp

camp single

single

fit world

world

yard fact

fact

now keep

keep

cry ground

ground

don't perhaps

perhaps

shout experiment

experiment

segment stick

stick

row clean

clean

live music

music

eat heavy

heavy

stay segment

segment

through beauty

beauty

open sky

sky

walk match

match

eight expect

expect

experience produce

produce

dollar practice

practice

bar six

six

view locate

locate

office fine

fine

die enough

enough

square line

line

also student

student

forest differ

differ

listen string

string

die use

use

told month

month

half lone

lone

neighbor size

size

row bell

bell

reason half

half

walk product

product

bank case

case

heard search

search

moon hurry

hurry

seven push

push

cat answer

answer

locate condition

condition

bad