jQuery ¸¦ ÀÌ¿ëÇÑ ¸Þ´º Ç÷¯±×ÀÎ ÀÔ´Ï´Ù.
¾ÐÃàµÈ js ÆÄÀÏÀº 9KB·Î ¸Å¿ì °¡º±½À´Ï´Ù.
IE11 ¿¡¼µµ ±¸µ¿ µË´Ï´Ù.
¿ÞÂÊ ¸Þ´º ¶Ç´Â ¿À¸¥ÂÊ ¸Þ´º ÇüÅ·Π¼³Á¤ÇÏ¿© »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.
HTML5¸¦ »ç¿ë ÇÕ´Ï´Ù.
BEM Ç¥±â¹ýÀ» »ç¿ëÇÕ´Ï´Ù.
¶óÀ̼¾½º´Â MIT License (MIT) ÀÔ´Ï´Ù.
¾Æ·¡´Â ½ÇÇàȸé ÀÔ´Ï´Ù.
»ç¿ë¹ý ¾È³» ÀÔ´Ï´Ù.
1. ¶óÀ̺귯¸®¸¦ È£Ãâ ÇÕ´Ï´Ù.
<!-- jQuery -->
<script src="./js/jquery.js"></script>
<!-- ma5menu -->
<link href="./css/ma5-menu.min.css" rel="stylesheet" type="text/css">
<script src="./js/ma5-menu.min.js"></script>
2. ÄÁÅÙÃ÷ ¹× ¸Þ´º¸¦ ¼±¾ð ÇÕ´Ï´Ù.
<!-- mobile menu toggle button start -->
<button class="ma5menu__toggle" type="button">
<span class="ma5menu__icon-toggle"></span><span class="ma5menu__sr-only">Menu</span>
</button>
<!-- mobile menu toggle button end -->
<!-- source for mobile menu start -->
<ul class="site-menu">
<li>
<a href="index-page.html">Shop</a>
<ul>
<li><a href="index-page.html">Products</a></li>
<li>
<a href="index-page.html">Collections</a>
<ul>
<li><a href="index-page.html">Premium</a></li>
<li><a href="index-page.html">Common</a></li>
<li>
<a href="index-page.html">Exclusive</a>
<ul>
<li><a href="index-page.html">First</a></li>
<li><a href="index-page.html">Secound</a></li>
</ul>
</li>
<li><a href="index-page.html">Other</a></li>
</ul>
</li>
<li>
<a href="index-page.html">Accesories</a>
<ul>
<li><a href="index-page.html">Small</a></li>
<li><a href="index-page.html">Medium</a></li>
<li><a href="index-page.html">Large</a></li>
</ul>
</li>
<li><a href="index-page.html">Cards</a></li>
<li>
<a href="index-page.html">Sets</a>
<ul>
<li><a href="index-page.html">Example 1</a></li>
<li><a href="index-page.html">Example 2</a></li>
<li><a href="index-page.html">Example 3</a></li>
<!-- active -->
<li class="active"><a href="index-page.html">Example 4</a></li>
<li><a href="index-page.html">Example 5</a></li>
</ul>
</li>
</ul>
</li>
<li>
...................................
</li>
...................................
...................................
<li><a href="index-page.html">Contact</a></li>
</ul>
<!-- source for mobile menu start -->
<!-- source for mobile menu footer start -->
<div id="ma5menu-tools" class="ma5menu__tools">
footer <a href="index-page.html">content</a> here
</div>
3. ½ÇÇà
<!-- Call the script -->
<script>
$(document).ready(function () {
ma5menu({
menu: '.site-menu',
activeClass: 'active',
footer: '#ma5menu-tools',
position: 'left',
closeOnBodyClick: true
});
});
</script>
|