MCPcopy Create free account
hub / github.com/dcloudio/mui / Toggle

Function Toggle

js/switches.js:34–40  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

32
33
34 var Toggle = function(element) {
35 this.element = element;
36 this.classList = this.element.classList;
37 this.handle = this.element.querySelector(SELECTOR_SWITCH_HANDLE);
38 this.init();
39 this.initEvent();
40 };
41 Toggle.prototype.init = function() {
42 this.toggleWidth = this.element.offsetWidth;
43 this.handleWidth = this.handle.offsetWidth;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected