fly_sidemenu

Recreate an Airbnb iOS7 App Menu Animation using CSS3 and jQuery

  • 所有者: peachananr/fly_sidemenu
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

#Fly Side Menu by Pete R.
Recreate an Airbnb iOS7 App Menu Animation using CSS3 and jQuery
Created by Pete R., Founder of BucketListly

Fly Side Menu

Demo

View demo

Compatibility

Modern browsers such as Chrome, Firefox, and Safari on both desktop and smartphones have been tested. I have not tested this on IE.

Basic Usage

Fly Side Menu is a script that will recreate the impressive animation you see on Airbnb's new iOS7 app using jQuery and CSS3. In additional to that, I've also added a few more options for you guys to play around with.

To add this to your website, make sure you've included the latest jQuery library together with jquery.fly_sidemenu.js and fly_sidemenu.css into your document's <head>, and make sure your HTML markup are as follows:

<body>
  ..
  <ul class="sidemenu">
    <li><a href="http://www.bucketlistly.com">BucketListly</a></li>
    <li><a href="http://www.mycolorscreen.com">MyColorScreen</a></li>
    <li><a href="http://www.thepetedesign.com">The Pete Design</a></li>
    <li><a href="http://www.thepetedesign.com/#design">Free jQuery Plugins</a></li>
    <li><a href="http://www.blog.bucketlistly.com">My Blog</a></li>
  </ul>
  ..
</body>

Note that your content inside this list will be displayed inside the sidebar. This can be placed anywhere you like on the page. Once that is done, simply call the function like this:

  $(".sidemenu").fly_sidemenu({
    btnContent: "=", // This option let you define what appears inside the side menu button. You can add your custom icon here. This option accepts all HTML tags. The default value is "=" string.
    position: "left", // This option will let you define where the sidebar will appear on the page. Available options are "top", "left", "right", "bottom". The default value is "left"
    customSelector: "li", // In case you do not want to use lists, simply define your own css selector here. The default value is "li".
    hideButton: false // You can disable the auto creation of toggle button by changing this to true. The default value is false.
  });

Public Method

$.fn.toggleMenu()

With this plugin, you can toggle the open/close animation programmatically by calling the toggleMenu function like this:

$(".sidemenu").toggleMenu();

Now you will have a similar kick ass side menu animation like you see on the AirBnb's iOS7 app. Stay tuned for more updates.

If you want to see more of my plugins, visit The Pete Design, or follow me on Twitter and Github.

Other Resources

主要指标

概览
名称与所有者peachananr/fly_sidemenu
主编程语言CSS
编程语言CSS (语言数: 2)
平台
许可证
所有者活动
创建于2013-12-01 07:32:43
推送于2020-05-08 01:25:56
最后一次提交2020-05-08 08:25:55
发布数0
用户参与
星数113
关注者数12
派生数39
提交数6
已启用问题?
问题数2
打开的问题数2
拉请求数0
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?