Skip to content

ideamean/gitbook-plugin-auto-scroll-table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

原插件存在bug, 刷新页面才能生效。需要将事件绑定的page.change事件上。对plugin.js做了修改:

require(["gitbook", "jQuery"], function(gitbook, $) {
  gitbook.events.bind("page.change", function() {
    [].slice.call(document.querySelectorAll('table')).forEach(function(el){
        var wrapper = document.createElement('div');
        wrapper.className = 'table-area';
        el.parentNode.insertBefore(wrapper, el);
        el.parentNode.removeChild(el);
        wrapper.appendChild(el);
    });
  });
});

使用方法

修改book.json的plugins,增加数组项:"auto-scroll-table@git+https://github.com/ideamean/gitbook-plugin-auto-scroll-table.git"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published