From a20bb60e93a4d8f8b58d069515de3b77e30669aa Mon Sep 17 00:00:00 2001 From: Lyle Underwood Date: Thu, 25 Oct 2012 17:28:29 -0700 Subject: [PATCH] add target option --- jquery.rm.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jquery.rm.js b/jquery.rm.js index 1637bd4..3b62f8f 100644 --- a/jquery.rm.js +++ b/jquery.rm.js @@ -123,7 +123,14 @@ var fontRatios = fontRatiosForFontSize(idealFontSize, opts.ratio, opts.scaleIncrements, opts.minimumFontSize); var $docElement = $(document.documentElement); - $docElement.css('font-size', idealFontSize + 'px'); + + if (opts.target) { + var $targetElement = $(opts.target); + } else { + var $targetElement = $docElement; + } + + $targetElement.css('font-size', idealFontSize + 'px'); $docElement.trigger('responsiveMeasureUpdated', { idealFontSize: idealFontSize, fontRatios: fontRatios