Coder Social home page Coder Social logo

wap_menu's Introduction

手機網站側欄模塊 wap_menu

效果演示

menu_wap

使用說明

  • 依賴zepto or jQuery;

  • 參考index.html or index_right_noscroll.html的框架組織

	<div class="m__wrap" id="wrap">
		<div class="m__main" id="main">
			<a href="javascript:;" id="menuBtn"></a>
			<div class="m__mask" id="mainMask"></div>
		</div>
		<div class="m__menu" id="menu">
			<div class="m__menu-box">
				menu內容
			</div>
		</div>
	</div>
  • 使用前請實例化一個對象,並執行初始化,如:
	var fModuleMenu = new FModuleMenu();
	fModuleMenu.init();

參數說明

direction:menu所在位置
type: String
value: 'left' or 'right'
default: 'left'

width:menu寬度
type: Number
value: all number
default: 230

bAnimate:是否啓用css3動畫滑動
type: Boolean
value: true or false
default: true

duration:完成過渡效果需要多少毫秒(ms)
type: Number
value: all number
default: 200

timingFunction:定義過渡效果的速度曲線
type: String
value: linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n)
請參考:[CSS3 transition-timing-function 属性] (http://www.w3school.com.cn/cssref/pr_transition-timing-function.asp)
default: 'ease-out'

bInnerScroll:側欄是否內部滾動,推薦true
type: Boolean
value: true or false
default: true

cbShow:顯示menu時執行的callback function
type: Function
value: Function
default: null

cbHide:隱藏menu時執行的callback function
type: Function
value: Function
default: null

wap_menu's People

Contributors

xiaoyaojones avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.