100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 基于jQuery倾斜打开侧边栏菜单特效代码【jquery】

基于jQuery倾斜打开侧边栏菜单特效代码【jquery】

时间:2020-10-28 17:22:46

相关推荐

基于jQuery倾斜打开侧边栏菜单特效代码【jquery】

web前端|js教程

jquery侧边栏菜单,jquery侧边栏

web前端-js教程

基于jQuery多重图片无限循环动画效果。这是一款非常实用的jQuery多图片无限循环动画特效插件。

男袜 源码,vscode创建txt文件,ubuntu保存推出,tomcat8 down,爬虫上传,验证码自动识别 php,南平seo优化邀请码,软件定制服务网站源码,快递系统网页模板lzw

效果图如下:

qq炫舞挂源码,集装箱vscode是什意思,ubuntu 远程连接,Tomcat移动文件夹,身上爬虫出来,php商城下载,高明seo软件优化多少钱lzw

一周授课时间 源码,Ubuntu文件访问日志,拼多多爬虫意思,计算m到n的累加和程序php,谷歌SEO岗位lzw

在线预览 源码下载

html代码:

点击左上角的按钮打开菜单

适用浏览器:、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗.

不支持IE及以下浏览器。

js代码:

var paperMenu = { $window: $(#paper-window), $paperFront: $(#paper-front), $hamburger: $(.hamburger), offset: , pageHeight: $(#paper-front).outerHeight(), open: function () { this.$window.addClass( ilt); this.$hamburger.off(click); $(#container, .hamburger).on(click, this.close.bind(this)); this.hamburgerFix(true); // console.log(opening...); }, close: function () { this.$window.removeClass( ilt); $(#container, .hamburger).off(click); this.$hamburger.on(click, this.open.bind(this)); this.hamburgerFix(false); // console.log(closing...); }, updateTransformOrigin: function () { scrollTop = this.$window.scrollTop(); equation = (scrollTop + this.offset) / this.pageHeight * ; this.$paperFront.css( ransform-origin, center + equation + \%); }, hamburgerFix: function (opening) { if (opening) {$(.hamburger).css({position: absolute,top: this.$window.scrollTop() + + px}); } else {setTimeout(function () {$(.hamburger).css({ position: fixed, top: px});}, ); } }, bindEvents: function () { this.$hamburger.on(click, this.open.bind(this)); $(.close).on(click, this.close.bind(this)); this.$window.on(scroll, this.updateTransformOrigin.bind(this)); }, init: function () { this.bindEvents(); this.updateTransformOrigin(); } }; paperMenu.init();

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。