문제 설명
Foundation 6의 TopBar가 작동하지 않음 (TopBar in foundation 6 not working)
파운데이션 6의 내 탑바가 어떻게든 작동하지 않습니다(어쨌든, Foundation.topbar.js가 존재하지 않습니다). 그러니 추가할 수 있도록 도와주세요.
저는 기초에 익숙하지 않습니다. 저는 13입니다. 그러니 고려해주세요. :)
그리고 다음은 전체 코드입니다.
<!doctype html>
<html class="no‑js" lang="en">
<head>
<meta charset="utf‑8" />
<meta http‑equiv="x‑ua‑compatible" content="ie=edge">
<meta name="viewport" content="width=device‑width, initial‑scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/app.css" />
</head>
<body>
<nav class="top‑bar">
<ul class="title‑area">
<li class="name">
<h1><i>Title</i></h1>
</li>
</ul>
</nav>
<div class="row">
<div class="large‑12 columns">
<div class="callout">
<h1>HEADER</h1>
</div>
</div>
</div>
<script type="text/javascript" src="<? bloginfo('template_url'); ?>/css/foundation‑5.2.2/js/foundation/foundation.topbar.js"></script>
<script src="js/vendor/jquery.min.js"></script>
<script src="js/vendor/what‑input.min.js"></script>
<script src="js/foundation.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>
이렇게 하면 됩니다.
내 JS 폴더입니다:
참조 솔루션
방법 1:
just you're coding in Foundation 5.x style. Look at this : http://foundation.zurb.com/sites/docs/top‑bar.html
방법 2:
thank you. and also download and import the .js folder from the foundation on git. the the topbar will "work".
방법 3:
It looks like you're just running this as a static page (html)
Yet in the path for your javascript includes you're including
<? bloginfo('template_url'); ?>
Which looks to be a php function
Might I suggest you run the likes of WAMPserver ( given you're running windows it's a simple way of getting Apache Mysql and PHP up and running on your local machine.
Additional note: As was said however it looks like you're including foundation 5.x code
"<? bloginfo('template_url'); ?>/css/foundation‑5.2.2/js/foundation/foundation.topbar.js"
(by panda_programmer、Servuc、panda_programmer、Forbairt)