MCPcopy
hub / github.com/docsifyjs/docsify / initEvent

Method initEvent

src/core/event/index.js:37–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 }
36
37 initEvent() {
38 // Bind toggle button
39 sidebar.btn('button.sidebar-toggle', this.router);
40 sidebar.collapse('.sidebar', this.router);
41 // Bind sticky effect
42 if (this.config.coverpage) {
43 !isMobile && on('scroll', sidebar.sticky);
44 } else {
45 body.classList.add('sticky');
46 }
47 }
48 };
49}

Callers 1

constructorMethod · 0.80

Calls 1

onFunction · 0.90

Tested by

no test coverage detected