Comparing version
@@ -1,12 +0,8 @@ | ||
/* ------------------------------------------------------------------------ | ||
* LC Switch | ||
* superlight pure javascript plugin improving forms look and functionality | ||
* | ||
* @version: 2.0.3 | ||
* @author: Luca Montanari (LCweb) | ||
* @website: https://lcweb.it | ||
* Licensed under the MIT license | ||
------------------------------------------------------------------------- */ | ||
/** | ||
* LC Switch - superlight pure javascript plugin improving forms look and functionality | ||
* @version: 2.0.4 | ||
* @author: Luca Montanari (LCweb) | ||
* @website: https://lcweb.it | ||
* Licensed under the MIT license | ||
*/ | ||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(h){return h.raw=h};$jscomp.createTemplateTagFirstArgWithRaw=function(h,e){h.raw=e;return h}; | ||
@@ -13,0 +9,0 @@ (function(h){if("undefined"!=typeof Element.prototype.lc_switch)return!1;var e=!1,p={on_txt:"ON",off_txt:"OFF",on_color:!1,compact_mode:!1},q=!1;window.lc_switch=function(c,a){a="object"!=typeof a?p:Object.assign({},p,a);f(c).forEach(function(b){if(!("INPUT"!=b.tagName||"INPUT"==b.tagName&&"checkbox"!=b.getAttribute("type")&&"radio"!=b.getAttribute("type")||b.parentNode.classList.length&&b.parentNode.classList.contains("lcs_wrap"))){var d=a.on_txt?'<div class="lcs_label lcs_label_on">'+a.on_txt+"</div>": |
{ | ||
"author": "LCweb", | ||
"name": "lc-switch", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Superlight vanilla javascript plugin improving forms look and functionality", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -37,3 +37,3 @@ # Superlight pure javascript form switch plugin by LCweb | ||
``` | ||
<script type="text/javascript> | ||
<script type="text/javascript"> | ||
lc_switch('input[type=checkbox], input[type=radio]'); | ||
@@ -79,3 +79,3 @@ </script> | ||
``` | ||
<script type="text/javascript> | ||
<script type="text/javascript"> | ||
const inputs = document.querySelectorAll('input[type=checkbox], input[type=radio]'); | ||
@@ -117,3 +117,3 @@ lc_switch(inputs): | ||
``` | ||
<script type="text/javascript> | ||
<script type="text/javascript"> | ||
document.querySelectorAll('input[type=checkbox], input[type=radio]').forEach(function(el) { | ||
@@ -120,0 +120,0 @@ |
11828
-1.31%30
-6.25%