Finally, initialize Foundation JS.
..
..
..
..
..
..
Adding multimedia elements to the dropdown menu:
Example
<
a
href=
"#"
data-dropdown=
"id01"
class=
"button dropdown"
Dropdown Button
<
/a
<
div
id=
"id01"
data-dropdown-content class=
"f-dropdown medium content"
<
h4
Paris Title
<
/h4
<
p
Some text.. some text..
<
/p
<
img
src=
"paris.jpg"
alt=
"Paris"
width=
"400"
height=
"300"
<
p
Paris, je t'aime.
<
/p
<
/div
Try it »
Dropdown Menu Direction
By default, the dropdown menu is at the bottom. You can change it by adding data-options="align:left|right|top" to modify its direction:
Example
<
a
href=
"#"
data-dropdown=
"id01"
data-options=
"align:right"
class=
"button dropdown"
Right
<
/a
<
a
href=
"#"
data-dropdown=
"id02"
data-options=
"align:top"
class=
"button dropdown"
Top
<
/a
<
a
href=
"#"
data-dropdown=
"id03"
data-options=
"align:bottom"
class=
"button dropdown"
Bottom
<
/a
<
a
href=
"#"
data-dropdown=
"id04"
data-options=
"align:left"
class=
"button dropdown"
Left
<
/a
Try it »
Dropdown Menu Trigger
By default, the dropdown menu is shown after clicking the button. If you need it to show on mouse hover, you can use on the button data-options="is_hover:true" Properties:
Example
<
a
href=
"#"
data-dropdown=
"id01"
data-options=
"is_hover:true"
class=
"button dropdown"
Hover over me
<
/a
<
ul
id=
"id01"
data-dropdown-content class=
"f-dropdown"
<
li
<
a
href=
"#"
Link 1
<
/a
<
/li
<
li
<
a
href=
"#"
Link 2
<
/a
<
/li
<
li
<
a
href=
"#"
Link 3
<
/a
<
/li
<
/ul
Try it »
Split button
We can add on the button .split class to set up a split button; after splitting, it will be in the element to generate a downward arrow icon button:
Example
<
button
class=
"button split"
Split Button
<
span
data-dropdown=
"id01"
<
/span
<
/button
<
ul
id=
"id01"
data-dropdown-content class=
"f-dropdown"
<
li
<
a
href=
"#"
Link 1
<
/a
<
/li
<
li
<
a
href=
"#"
Link 2
<
/a
<
/li
<
li
<
a
href=
"#"
Link 3
<
/a
<
/li
<
/ul
<
script
$(document).ready(function() {
$(document).foundation();
})
<
/script
Try it »