Permalink
Browse files

Fixed parent node styling

  • Loading branch information...
thingsinjars
thingsinjars committed May 21, 2011
1 parent 9db30f2 commit 746c1c6fd49e7dd0ea5eef0d4648c42509ea11fe
Showing with 2 additions and 2 deletions.
  1. +2 −2 jquery.scoped.js
View
@@ -63,7 +63,7 @@
var holdingArea = [];
//Read all styles and copy them to a holding area
- $this.parent().find('*').each(function() {
+ $this.parent().find('*').add($this.parent()).each(function() {
var this_tag = this.nodeName;
$(this).css('cssText','');
if(this.nodeName != 'STYLE') {
@@ -72,7 +72,7 @@
});
//Copy all the styles back from the holding area onto the in-scope elements
- $this.parent().find('*').each(function() {
+ $this.parent().find('*').add($this.parent()).each(function() {
var this_tag = this.nodeName;
if(this.nodeName != 'STYLE') {
var this_style = holdingArea.shift();

0 comments on commit 746c1c6

Please sign in to comment.