`

3D动画菜单

 
阅读更多

3D动画菜单

 
3D动画菜单

 

 <div class="meny">

<h2>freejs</h2>
<ul>
<li><a href="daohangcaidan.html" title="各种下拉菜单,导航,多级菜单,右侧展开,左侧展开">导航菜单</a></li>
           <li><a href="tabbiaoqian.html" title="tab标签,选项卡,选卡,jquery选项卡,标签页,动态加载tab">TAB标签</a></li>
           <li><a href="jiaodiantu.html" title="焦点图,相册,幻灯片,轮播图">焦点图</a></li>
           <li><a href="fenye.html" title="翻页,分页,无刷新翻页,jquery翻页
本站演示中的分页数据库结构都一样的">分页</a></li>
           <li><a href="biaodan.html" title="表单,jquery更新表单,无刷新更新数据,表单检测,无刷新评论,无刷新留言,联动菜单,上传图片文件,批量上传,jquery上传">表单</a></li>
           <li><a href="jquerytupiantexiao.html" title="Jquery图片特效">Jquery图片</a></li>
           <li><a href="jquerywenzi.html" title="jquery文字特效,js文字特效,包括一些其他js库的,例如mootools">Jquery文字</a></li>
 
</ul>
</div>
 
<div class="meny-arrow"></div>
 
<div class="contents">
<article>
<h1>Meny</h1>
<p>
3D动画菜单,点击下面的箭头演示
</p>
<p>
 
 
</p>
 
 
</article>
 
 
 
 
 
<script src="js/meny.min.js"></script>
<script>
// Create an instance of Meny
var meny = Meny.create({
// The element that will be animated in from off screen
menuElement: document.querySelector( '.meny' ),
 
// The contents that gets pushed aside while Meny is active
contentsElement: document.querySelector( '.contents' ),
 
// [optional] The alignment of the menu (top/right/bottom/left)
position: Meny.getQuery().p || 'left',
 
// [optional] The height of the menu (when using top/bottom position)
height: 200,
 
// [optional] The width of the menu (when using left/right position)
width: 260,
 
// [optional] Distance from mouse (in pixels) when menu should open
threshold: 40,
 
// [optional] Use mouse movement to automatically open/close
mouse: true,
 
// [optional] Use touch swipe events to open/close
touch: true
});
 
// API Methods:
// meny.open();
// meny.close();
// meny.isOpen();
 
// Events:
// meny.addEventListener( 'open', function(){ console.log( 'open' ); } );
// meny.addEventListener( 'close', function(){ console.log( 'close' ); } );
 
// Embed an iframe if a URL is passed in
if( Meny.getQuery().u && Meny.getQuery().u.match( /^http/gi ) ) {
var contents = document.querySelector( '.contents' );
contents.style.padding = '0px';
contents.innerHTML = '<div class="cover"></div><iframe src="'+ Meny.getQuery().u +'" style="width: 100%; height: 100%; border: 0; position: absolute;"></iframe>';
}
</script>
 


原文地址:http://www.freejs.net/article_jquerywenzi_199.html

0
0
分享到:
评论
2 楼 laofanlaile 2014-10-30  
  为何这么牛逼
1 楼 come_for_dream 2014-05-26  
mark   

相关推荐

Global site tag (gtag.js) - Google Analytics