Skip to content

Commit

Permalink
fixing skipStyle logic
Browse files Browse the repository at this point in the history
  • Loading branch information
heygrady committed May 20, 2011
1 parent 032e4b0 commit c4903fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions jquery.textshadow.js
Expand Up @@ -11,7 +11,8 @@
options = value;
value = null;
}
var skipStyle = options.skipStyle || true;
var opts = options || {};
var useStyle = opts.useStyle || false;

// loop the found items
return this.each(function() {
Expand All @@ -26,7 +27,7 @@
allWords(this);
$copy = $elem.find('.ui-text-shadow-copy');
}
if (!skipStyle)
if (useStyle) {
applyStyles($elem, $copy, value);
}
});
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Expand Up @@ -13,7 +13,7 @@ It is recommended to use this library with a feature detection library such as [
$('h1').textshadow();

// reading the current style automatically
$('h1').textshadow({skipStyles: false});
$('h1').textshadow({useStyle: true});
// normal
$('h1').textshadow('2px 2px 2px #000');
Expand Down

0 comments on commit c4903fa

Please sign in to comment.