bulma-slider
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -0,3 +1,13 @@ | ||
<a name="1.0.4"></a> | ||
## [1.0.4](https://github.com/Wikiki/bulma-slider/compare/1.0.1...1.0.4) (2018-03-29) | ||
### Bug Fixes | ||
* **js:** Not defined variable ([7f6bde6](https://github.com/Wikiki/bulma-slider/commit/7f6bde6)) | ||
<a name="1.0.3"></a> | ||
## [1.0.3](https://github.com/Wikiki/bulma-slider/compare/1.0.1...1.0.3) (2018-03-05) | ||
## [1.0.3](https://github.com/Wikiki/bulma-slider/compare/1.0.1...1.0.3) (2018-03-29) | ||
@@ -4,0 +14,0 @@ |
@@ -68,4 +68,8 @@ (function () { | ||
// Check for prefix and postfix | ||
var prefix = (output.hasAttribute('data-prefix') ? output.getAttribute('data-prefix') : ''); | ||
var postfix = (output.hasAttribute('data-postfix') ? output.getAttribute('data-postfix') : ''); | ||
// Update output with slider value | ||
output.value = event.target.value; | ||
output.value = prefix + event.target.value + postfix; | ||
}); | ||
@@ -72,0 +76,0 @@ } |
@@ -1,2 +0,2 @@ | ||
(function(){'use strict';function a(a){for(var b=a.id,c=document.getElementsByTagName('output'),d=0;d<c.length;d++)if(c[d].htmlFor==b)return c[d]}function b(a){var b,c,d=window.getComputedStyle(a,null),e=parseInt(d.getPropertyValue('width'),10);c=a.getAttribute('min')?a.getAttribute('min'):0;var f=(a.value-c)/(a.getAttribute('max')-c);return b=0>f?0:1<f?e:e*f,{position:b+'px'}}document.addEventListener('DOMContentLoaded',function(){var c=document.querySelectorAll('input[type="range"].slider');[].forEach.call(c,function(c){var d=a(c);if(d){if(c.classList.contains('has-output-tooltip')){var e=b(c);d.style.left=e.position}c.addEventListener('input',function(a){if(a.target.classList.contains('has-output-tooltip')){var c=b(a.target);d.style.left=c.position}d.value=a.target.value})}})})})(); | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9leHRlbnNpb24uanMiXSwibmFt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cHV0LnZhbHVlID0gZXZlbnQudGFyZ2V0LnZhbHVlO1xuICAgICAgfSk7XG4gICAgfVxuICB9KTtcbn0pO1xuIl19 | ||
(function(){'use strict';function a(a){for(var b=a.id,c=document.getElementsByTagName('output'),d=0;d<c.length;d++)if(c[d].htmlFor==b)return c[d]}function b(a){var b,c,d=window.getComputedStyle(a,null),e=parseInt(d.getPropertyValue('width'),10);c=a.getAttribute('min')?a.getAttribute('min'):0;var f=(a.value-c)/(a.getAttribute('max')-c);return b=0>f?0:1<f?e:e*f,{position:b+'px'}}document.addEventListener('DOMContentLoaded',function(){var c=document.querySelectorAll('input[type="range"].slider');[].forEach.call(c,function(c){var d=a(c);if(d){if(c.classList.contains('has-output-tooltip')){var e=b(c);d.style.left=e.position}c.addEventListener('input',function(a){if(a.target.classList.contains('has-output-tooltip')){var c=b(a.target);d.style.left=c.position}var e=d.hasAttribute('data-prefix')?d.getAttribute('data-prefix'):'',f=d.hasAttribute('data-postfix')?d.getAttribute('data-postfix'):'';d.value=e+a.target.value+f})}})})})(); | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9leHRlbnNpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IllBQUEsYUFDQSxBQUFTLEFBQW1CLEFBQUMsQUFBTyxhQUFFLEFBQ3BDLENBRUEsQUFBSyxPQUZELEFBQUssR0FBRyxBQUFPLEVBQUMsQUFBRSxBQUFDLEFBQ3ZCLEdBQUksQUFBTyxFQUFHLEFBQVEsU0FBQyxBQUFvQixxQkFBQyxBQUFRLEFBQUMsQUFBQyxVQUM3QyxBQUFDLEVBQUcsQUFBQyxFQUFFLEFBQUMsRUFBRyxBQUFPLEVBQUMsQUFBTSxPQUFFLEFBQUMsQUFBRSxBQUFFLElBQ3ZDLEdBQUksQUFBTyxBQUFDLEFBQUMsQUFBQyxLQUFDLEFBQU8sQUFBSSxBQUFLLFdBQzdCLE1BQU8sQU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S1wcmVmaXgnKSA6ICcnKTtcbiAgICAgICAgdmFyIHBvc3RmaXggPSAob3V0cHV0Lmhhc0F0dHJpYnV0ZSgnZGF0YS1wb3N0Zml4JykgPyBvdXRwdXQuZ2V0QXR0cmlidXRlKCdkYXRhLXBvc3RmaXgnKSA6ICcnKTtcbiAgICAgICAgXG4gICAgICAgIC8vIFVwZGF0ZSBvdXRwdXQgd2l0aCBzbGlkZXIgdmFsdWVcbiAgICAgICAgb3V0cHV0LnZhbHVlID0gcHJlZml4ICsgZXZlbnQudGFyZ2V0LnZhbHVlICsgcG9zdGZpeDtcbiAgICAgIH0pO1xuICAgIH1cbiAgfSk7XG59KTtcbiJdfQ== |
{ | ||
"name": "bulma-slider", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Display classic slider more sexy, in different colors, sizes, and states ", | ||
@@ -5,0 +5,0 @@ "main": "dist/bulma-slider.sass", |
35102
95