Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
demo
README.md
toggle-switch.css
toggle-switch.js
xtag.json

README.md

Syntax

<x-toggle-switch input-name="turbo"></x-toggle-switch>

Live Example

Events

	var switch = document.getElementsByNames('x-toggle-switch')[0];
	switch.addEventListener('on', function(e){
		
	});

Usage


	
	var switch = document.createElement('x-toggle-switch');
	switch.inputName = "notifications";
	switch.onText = 'yes';
	switch.offText = 'no';
	switch.setOff();
	document.body.appendChild(switch);