From 663c5aeb93367126e6932c494ba3356988132e90 Mon Sep 17 00:00:00 2001 From: "Tony L. Kerz" Date: Sat, 25 Jul 2015 17:06:29 -0400 Subject: [PATCH] [placeholder] allow for omission of certain attributes on placeholder clone there is an issue with cloning out data-reactid attributes on placeholder --- visibility.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/visibility.js b/visibility.js index caec7e3..2d6b840 100644 --- a/visibility.js +++ b/visibility.js @@ -304,6 +304,10 @@ $.fn.visibility = function(parameters) { .addClass(className.placeholder) .insertAfter($module) ; + if (settings.omitPlaceholderAttrs) + { + $placeholder = $placeholder.find('*').addBack().removeAttr(settings.omitPlaceholderAttrs); + } } }, @@ -1213,4 +1217,4 @@ $.fn.visibility.settings = { }; -})( jQuery, window , document ); \ No newline at end of file +})( jQuery, window , document );