GithubHelp home page GithubHelp logo

jquery.outline's Introduction

#语义化大纲

##结构化

  • 自动生成大纲,推广结构化的内容。
  • 网站博客内容语义化,如果不规范的使用header马上发现。

##兼容 兼容所有的主流浏览器

IE8+

##试一试

##如何使用

  1. 先引用jQuery
  2. 引用jquery.outline.js
  3. 在要生成大纲容器标签加属性data-outline 属性值为要生成大纲区域的选择器。
    如 data-outline="article" 生成大纲区域article。

#####手动调用

        $.outline({
            contentSelector: '[data-outline]',
            selector: $('[data-outline]').data('outline')});
			
			

#####选项说明

				必选值
				contentSelector:	//生成大纲后存在的容器 
				可选值
                selector: 'body',  //css选择器,选择的范围
                hArray: ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'], //要识别的header
                addSpy: true,//是否添加滚动事件监听
                hasTitle: false, //范围内是否第一个是标题
                offset: 20 //偏离的位置

jquery.outline's People

Contributors

allnightlong avatar clslrns avatar etoah avatar jmocana2 avatar martl avatar sxalexander 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.