Skip to content

Instantly share code, notes, and snippets.

@mamboer
Last active December 16, 2015 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamboer/5363834 to your computer and use it in GitHub Desktop.
Save mamboer/5363834 to your computer and use it in GitHub Desktop.
jquery.fanmenu demo code
<!--Dom structure for jquery.fanmenu.js-->
<div id='testMenu' class="fm_wrap" >
<a class="fm_btntoggle" href="#" title="Toggle"><i>+</i></a>
<ul class="fm_list">
<li><a href="#"><i class="icon-user icon-white"></i></a></li>
<li><a href="#"><i class="icon-heart icon-white"></i></a></li>
<li><a href="#"><i class="icon-music icon-white"></i></a></li>
<li><a href="#"><i class="icon-home icon-white"></i></a></li>
<li><a href="#"><i class="icon-flag icon-white"></i></a></li>
</ul>
</div>
<!--script api for jquery.fanmenu.js-->
<script>
$(function() {
$('#testMenu').fanmenu({
eventName:'click',
//hide the menu when clicking the other places on the document
hideOnClick:true,
//donot hide the menu when clicking on these elements with className 'fm_antihide'
hideOnClickExcept:'fm_antihide'
initAngle: 0, // initial angle for the fan
angleDisplay: 90, // fan's displaying angle
radius:200, // radius of the fan
clActive:'fm_active',
clDeactive:'fm_off',
clToggleEffect:'fm_rotate',
cssMenuToggle:'.fm_btntoggle',
cssMenuItem:'.fm_list>*'
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment