css - Foundation top-bar isn't working -
I'm trying to use the foundation to create a navigation menu. I load black content with my content , But some features do not work. For example, the drop down menu does not work when the mouse slides on it. Besides, the proper mouseover effect is not working, am I forgetting something?
This is my code
& lt; Head runat = "server" & gt; & Lt; Title & gt; & Lt; / Title & gt; & Lt; Asp: ContentPlaceHolder ID = "head" runat = "server" & gt; & Lt; / ASP: ContentPlaceHolder & gt; & Lt; -! Jquery - & gt; & Lt; Script src = "js / jquery-1.11.2.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; -! Foundation - & gt; & Lt; Script src = "js / foundation.min.js" type = "text / javascript" & gt; & Lt; / Script & gt; & Lt; Link rel = "stylesheet" href = "css / foundation.css" type = "text / css" /> & Lt; Link rel = "stylesheet" href = "css / normalize.css" type = "text / css" /> & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form id = "form1" runat = "server" & gt; & Lt; Div & gt; & Lt; Div class = "included-to-grid sticky" & gt; & Lt; Nav class = "top-bar" role = "navigation" data-option = "is_hover: true" & gt; & Lt; Ul class = "title-area" & gt; & Lt; Li class = "name" & gt; & Lt; H1 & gt; & Lt; A href = "#" & gt; VoIP Innovation & lt; / A & gt; & Lt; / H1> & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Section class = "top-bar-section" & gt; & Lt; Ul class = "left" & gt; & Lt; Li class = "is dropdown" & gt; & Lt; A href = "#" & gt; Service & lt; / A & gt; & Lt; Ul class = "dropdown" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Origin & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Termination & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; E 911 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Hosted billing & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navy 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navi 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navi 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navi 5 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Section & gt; & Lt; / Neo & gt; & Lt; / Div & gt; & Lt; Asp: ContentPlaceHolder id = "content placeholder 1" runat = "server" & gt; & Lt; / ASP: ContentPlaceHolder & gt; & Lt; / Div & gt; & Lt; / Form & gt; & Lt; Script & gt; $ (Document) .foundation (); & Lt; / Script & gt;
This is working.
First of all, you must keep the data topbar attribute in your nav element.
Second, you have put li with the menu in your code:
Full HTML:
& lt; Nav class = "top-bar" data-topbar role = "navigation" data-option = "is_hover: true" & gt; & Lt; Ul class = "title-area" & gt; & Lt; Li class = "name" & gt; & Lt; H1 & gt; & Lt; A href = "#" & gt; VoIP Innovation & lt; / A & gt; & Lt; / H1> & Lt; / Li & gt; & Lt; Li class = "toggle-topbar menu-icon" & gt; & Lt; A href = "#" & gt; & Lt; Period & gt; From the menu & lt; / Span & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Section class = "top-bar-section" & gt; & Lt; Ul class = "left" & gt; & Lt; Li class = "is dropdown" & gt; & Lt; A href = "#" & gt; Service & lt; / A & gt; & Lt; Ul class = "dropdown" & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Origin & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Termination & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; E911 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Hosted billing & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navy 2 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navi 3 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navi 4 & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Navi 5 & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Section & gt; & Lt; / Neo & gt;
Comments
Post a Comment