From 3093c9ccd9b3124d3b1f146337e35071040e32f8 Mon Sep 17 00:00:00 2001 From: Matthieu Lalonde Date: Thu, 8 Nov 2012 15:03:01 -0500 Subject: [PATCH] Added jquery clone styles plugin --- resources/vendors/jquery/cloneStyles.js | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 resources/vendors/jquery/cloneStyles.js diff --git a/resources/vendors/jquery/cloneStyles.js b/resources/vendors/jquery/cloneStyles.js new file mode 100644 index 0000000..b22b942 --- /dev/null +++ b/resources/vendors/jquery/cloneStyles.js @@ -0,0 +1,38 @@ +/* + * getStyleObject Plugin for jQuery JavaScript Library + * From: http://upshots.org/?p=112 + * + * Copyright: Unknown, see source link + * Plugin version by Dakota Schneider (http://hackthetruth.org) + * + * Source: http://stackoverflow.com/a/6416477 + */ + +(function($){ + $.fn.getStyleObject = function(){ + var dom = this.get(0); + var style; + var returns = {}; + if(window.getComputedStyle){ + var camelize = function(a,b){ + return b.toUpperCase(); + }; + style = window.getComputedStyle(dom, null); + for(var i=0;i