diff --git a/README.md b/README.md index 185eb80..e779ef1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -jquery.switcher v1.1.0 +jquery.switcher v1.1.1 =============== Custom checkbox / radio button in jquery diff --git a/bower.json b/bower.json index 44d67ac..6ffbd85 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jquery.switcher", - "version": "1.1.0", + "version": "1.1.1", "homepage": "http://djanix.github.io/jquery.switcher/", "docs": "http://amsul.github.io/pickadate.js", "authors": [ diff --git a/dist/switcher.css b/dist/switcher.css index b26a7ee..7076a59 100644 --- a/dist/switcher.css +++ b/dist/switcher.css @@ -1,5 +1,5 @@ -/* jquery.switcher - 1.1.0 -* Copyright (c) 2014-07-16 Janic Beauchemin - https://github.com/djanix/ */ +/* jquery.switcher - 1.1.1 +* Copyright (c) 2014-07-17 Janic Beauchemin - https://github.com/djanix/ */ .switcher { diff --git a/dist/switcher.js b/dist/switcher.js index 3f629be..a733822 100644 --- a/dist/switcher.js +++ b/dist/switcher.js @@ -7,7 +7,7 @@ * Under MIT License */ -/* jquery.switcher - 1.0.1 +/* jquery.switcher - 1.1.1 * Copyright (c) 2014-07-11 Janic Beauchemin - https://github.com/djanix/ */ ;(function ($, window, document, undefined) { diff --git a/dist/switcher.min.css b/dist/switcher.min.css index 12f4458..df7e710 100644 --- a/dist/switcher.min.css +++ b/dist/switcher.min.css @@ -1,5 +1,5 @@ -/* jquery.switcher - 1.1.0 -* Copyright (c) 2014-07-16 Janic Beauchemin - https://github.com/djanix/ */ +/* jquery.switcher - 1.1.1 +* Copyright (c) 2014-07-17 Janic Beauchemin - https://github.com/djanix/ */ .switcher{background-color:#fff;border:1px solid #dfdfdf;border-radius:4px;display:inline-block;font-family:"Lucida Sans Unicode","Lucida Grande",sans-serif;font-size:12px;line-height:26px;padding:2px;text-transform:uppercase;-webkit-transition:background-color 0.3s;transition:background-color 0.3s;min-width:80px}.switcher input{display:none}.switcher .content{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.switcher .text{cursor:default;overflow:hidden;text-align:center;white-space:nowrap;width:50%}.switcher .textYes{color:#fff;float:left}.switcher .textNo{color:#9f9f9f;float:right}.switcher .slider{background-color:#fff;border-radius:4px;-webkit-box-shadow:0 0 2px 1px #dfdfdf;box-shadow:0 0 2px 1px #dfdfdf;height:26px;left:0;position:absolute;top:0;-webkit-transform:translateX(0%);-ms-transform:translateX(0%);transform:translateX(0%);-webkit-transition:-webkit-transform 0.3s;transition:transform 0.3s;width:50%;z-index:2}.switcher.is-active{background-color:#519b20}.switcher.is-active .slider{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.switcher.is-disabled{opacity:0.4} diff --git a/dist/switcher.min.js b/dist/switcher.min.js index b9d8c73..fcd807a 100644 --- a/dist/switcher.min.js +++ b/dist/switcher.min.js @@ -1,4 +1,4 @@ -/* jquery.switcher - 1.1.0 -* Copyright (c) 2014-07-16 Janic Beauchemin - https://github.com/djanix/ */ +/* jquery.switcher - 1.1.1 +* Copyright (c) 2014-07-17 Janic Beauchemin - https://github.com/djanix/ */ !function(a){function b(b,c){this.input=b,this.container=null,this.settings=a.extend({},h,a(b).data(),c),this._defaults=h,this._name=g,this.init()}function c(){this.removeEventListener("touchmove",d),this.removeEventListener("touchend",c),k=!1}function d(b){if(b.preventDefault(),k){var d=b.touches[0].pageX,e=b.touches[0].pageY,f=i-d,g=j-e,h=null;Math.abs(f)>=l?h=f>0?"left":"right":Math.abs(g)>=l&&(h=g>0?"down":"up"),h&&(c.call(this),a(this).trigger("swipe",h).trigger("swipe"+h))}}function e(a){1==a.touches.length&&(i=a.touches[0].pageX,j=a.touches[0].pageY,k=!0,this.addEventListener("touchmove",d,!1),this.addEventListener("touchend",c,!1))}function f(){this.addEventListener&&this.addEventListener("touchstart",e,!1)}var g="switcher",h={"class":"switcher",selected:!1,language:"en",disabled:!1,copy:{en:{yes:"yes",no:"no"},fr:{yes:"oui",no:"non"}}};a.extend(b.prototype,{init:function(){this.buildHtml(this.input,this.settings),this.bindEvents(this.container,this.settings)},buildHtml:function(b,c){var d=this,e=a(b);e.wrap('
'),e.after('