Permalink
Browse files

Sets the default HalfStyle style-set to 'hs-base' if no 'data-halfsty…

…le' attribute is present on '.textToHalfStyle' instances.
  • Loading branch information...
arbelh committed May 25, 2018
1 parent 3e72440 commit de531bf0b1791338fa3e2c72cd39a0c2af735ab9
Showing with 5 additions and 3 deletions.
  1. +4 −2 README.md
  2. +1 −1 js/halfstyle.js
View
@@ -45,6 +45,8 @@ The included `demo.html` file holds several examples for you.
<hr/>
## Changelog
- v2.0.2
- Sets the default HalfStyle style-set to 'hs-base' if no 'data-halfstyle' attribute is present on '.textToHalfStyle' instances.
- v2.0.1
- Fixes a Chrome 59 and above issue - Addresses a Chrome bug where Chrome fails to correctly render and repaint pseudo elements - I came up with this fix after many different tests.
@@ -72,6 +74,6 @@ The included `demo.html` file holds several examples for you.
- Los Angeles, CA
<hr/>
[1]: http://jsfiddle.net/arbel/pd9yB/1354/
[1]: http://jsfiddle.net/arbel/pd9yB/1693/
[2]: https://github.com/arbelh/HalfStyle/archive/master.zip
[3]: http://jsfiddle.net/arbel/pd9yB/1353/
[3]: http://jsfiddle.net/arbel/pd9yB/1692/
View
@@ -10,7 +10,7 @@ jQuery(function($) {
// Iterate over all class occurrences
$('.textToHalfStyle').each(function(idx, halfstyle_el) {
$halfstyle_el = $(halfstyle_el);
halfstyle_style = $halfstyle_el.data('halfstyle');
halfstyle_style = $halfstyle_el.data('halfstyle') || 'hs-base';
halfstyle_text = $halfstyle_el.text();
halfstyle_chars = halfstyle_text.split('');

0 comments on commit de531bf

Please sign in to comment.