From c4903fa87f2e8436dd331a89563f79e9956e94df Mon Sep 17 00:00:00 2001 From: heygrady Date: Thu, 19 May 2011 17:48:56 -0700 Subject: [PATCH] fixing skipStyle logic --- jquery.textshadow.js | 5 +++-- readme.md | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jquery.textshadow.js b/jquery.textshadow.js index 98ad108..c3cefd6 100644 --- a/jquery.textshadow.js +++ b/jquery.textshadow.js @@ -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() { @@ -26,7 +27,7 @@ allWords(this); $copy = $elem.find('.ui-text-shadow-copy'); } - if (!skipStyle) + if (useStyle) { applyStyles($elem, $copy, value); } }); diff --git a/readme.md b/readme.md index 9747c85..19957ba 100644 --- a/readme.md +++ b/readme.md @@ -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');