Permalink
Browse files

ADD responive letter-spacing

  • Loading branch information...
jacksbox
jacksbox committed Jan 25, 2016
1 parent 58df6a6 commit 0d5239edb249a84fcee916a1b531b11dbed91f47
Showing with 12 additions and 3 deletions.
  1. +10 −1 jquery.fractionslider.js
  2. +2 −2 jquery.fractionslider.min.js
@@ -1,5 +1,5 @@
/*!
* jQuery Fraction Slider v0.9.103
* jQuery Fraction Slider v1.0
* http://fractionslider.jacksbox.de
*
* Author: Mario Jäckle
@@ -1096,6 +1096,7 @@
}
obj.attr('data-fontsize', obj.css('font-size'));
obj.attr('data-letterspacing', obj.css('letter-spacing'));
});
@@ -1165,6 +1166,14 @@
obj.css("lineHeight", '100%');
}
var spacing_value = obj.attr('data-letterspacing');
if (spacing_value.indexOf('px') > 0) {
spacing_value = spacing_value.substring(0, spacing_value.length - 2);
n = pixelToPercent(spacing_value, dY) * (slider.find('.fs-stretcher').height() / 100);
obj.css("letterSpacing", n + "px");
}
});
}
Oops, something went wrong.

0 comments on commit 0d5239e

Please sign in to comment.