Title: Sliding Menus Example
1Sliding Menus Example
Dog Breeds body Popular Dog Breeds Sporting
Dogs Cocker Spaniel
Golden
Retriever
Irish Setter
English Springer
Spaniel Hounds Beagle
Bassett
Hound
Dachshund
Try It
2Sliding Menus Example v1 (contd)
Dog Breeds ody bgcolor"FFFFFF" Popular Dog
Breeds onclick"return toggleMenu('menu1')"Sporting
Dogs id"menu1" Cocker Spaniel
Golden
Retriever
Irish Setter
English Springer
Spaniel onclick"return toggleMenu('menu2')"Hounds h3 Beagle
B
assett Hound
Dachshund tml
The tags group sequential elements into a
single new HTML element. This element has two
attributes here class (which defines a style)
and id (which defines a unique identifier for the
element).
3Sliding Menus Example (contd)
Dog Breeds type"text/css" .menu displaynone
margin-left20px class"menu" id"menu1" Cocker
Spaniel
Golden Retriever
Irish
Setter
English Springer Spaniel
Defines the style named menu. It sets two
attributes, display and margin-left, for any
element employing this style. These attributes
can be overridden.
Try It
4Sliding Menus Example (contd)
language"Javascript" function
toggleMenu(currMenu) theMenuStyle
document.getElementById(currMenu).style if
(theMenuStyle.display "block")
theMenuStyle.display "none" else
theMenuStyle.display "block" script .menuStyle
displaynone margin-left20px
'menu1') return false"Sporting
Dogs id"menu1" Cocker Spaniel
Try It