1 Star 0 Fork 12

fufuok / pageintro.js

forked from liu / pageintro.js 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.zh-cn.md 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
liu 提交于 2017-03-29 17:56 . Update README.zh-cn.md

pageintro.js

一个简单的页面引导 jQuery 插件,可以为你的网站和项目提供新功能介绍和逐步的用户引导功能。

Demo screenshot

编译方法

你需要先安装 compass 和 coffee-script:

gem install compass
npm install -g coffee-script

然后运行以下命令编译源文件:

compass compile
coffee -o dist -c src/pageintro.coffee

最后,你可以在 dist 目录下找到输出的文件

示例

var options = {
  container: 'body',
  spacing: 20,
  actions: {
    next: {
      text: 'Next',
      class: 'your custom button class'
    },
    finish: {
      text: 'Finish',
      class: 'your custom button class'
    }
  },
  entries: [
    {
      selector: '#example',
      text: 'this is example',
      onEnter: function () {
        console.log('enter');
      },
      onExit: function () {
        console.log('exit');
      }
    }, {
      selector: '#step1',
      text: 'text for step 1'
    }, {
      selector: '#step2',
      text: 'text for step 2'
    }
  ]
}
PageIntro.init(options);
PageIntro.start();

用法

PageIntro.init()

初始化页面向导插件,你需要在这里指定相关配置参数。

PageIntro.start()

开始显示当前页面引导

PageIntro.finish()

结束并隐藏当前页面引导

CoffeeScript
1
https://gitee.com/fufuokx/pageintro.js.git
git@gitee.com:fufuokx/pageintro.js.git
fufuokx
pageintro.js
pageintro.js
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891