이 코드가 에러 나는데, 도대체 무슨 이유 일까요?
본문
맨 끝줄에서 에러가 나네요.
<link type="text/css" rel="stylesheet" href="css/demo.css" />
<link type="text/css" rel="stylesheet" href="../dist/core/css/jquery.mmenu.css" />
<link type="text/css" rel="stylesheet" href="../dist/addons/css/jquery.mmenu.dragopen.css" />
<!-- for the one page layout -->
<style type="text/css">
#intro,
#first,
#second,
#third
{
height: 400px;
}
#intro
{
padding-top: 0;
}
#first,
#second,
#third
{
border-top: 1px solid #ccc;
padding-top: 150px;
}
</style>
<!-- for the fixed header -->
<style type="text/css">
.header,
.footer
{
box-sizing: border-box;
width: 100%;
position: fixed;
}
.header
{
top: 0;
}
.footer
{
bottom: 0;
}
</style>
<script type="text/javascript" src="http://hammerjs.github.io/dist/hammer.min.js"></script>
<script type="text/javascript" src="../dist/core/js/jquery.mmenu.min.js"></script>
<script type="text/javascript" src="../dist/addons/js/jquery.mmenu.dragopen.min.js"></script>
<script type="text/javascript" src="../dist/addons/js/jquery.mmenu.fixedelements.min.js"></script>
<script type="text/javascript">
$(function() {
var $menu = $('nav#menu'),
$html = $('html, body');
$menu.mmenu({
dragOpen: true
});
var $anchor = false;
$menu.find( 'li > a' ).on(
'click',
function( e )
{
$anchor = $(this);
}
);
var api = $menu.data( 'mmenu' );
api.bind( 'closed',
function()
{
if ( $anchor )
{
var href = $anchor.attr( 'href' );
$anchor = false;
// if the clicked link is linked to an anchor, scroll the page to that anchor
if ( href.slice( 0, 1 ) == '#' )
{
$html.animate({
scrollTop: $( href ).offset().top
});
}
}
}
);
});
</script>
답변 1
<script type="text/javascript"
src=
"http://hammerjs.github.io/dist/hammer.min.js"
></script>
이걸 다운받아서 루트경로로 바꿔보시면 어떨까요?? 간혹 이렇게 주소를 가져오면...오류뜨는 경우가 있긴 하던데..
답변을 작성하시기 전에 로그인 해주세요.