From 07abf71b4f525c358509cb064e4dcd39b023708d Mon Sep 17 00:00:00 2001 From: Dave Mayo Date: Wed, 17 Oct 2012 18:06:50 -0400 Subject: [PATCH] fixes 139 - With/Without example --- entries/andSelf.xml | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/entries/andSelf.xml b/entries/andSelf.xml index c44f26b3..67e2f1c3 100644 --- a/entries/andSelf.xml +++ b/entries/andSelf.xml @@ -26,19 +26,33 @@ Find all divs, and all the paragraphs inside of them, and give them both class names. Notice the div doesn't have the yellow background color since it didn't use .andSelf(). p").addClass("border"); +$("div.before-andself").find("p").addClass("background"); +$("div.after-andself").find("p").andSelf().addClass("background"); ]]> - +p, div { margin:5px; padding:5px; } +.border { border: 2px solid red; } +.background { background:yellow; } +.left, .right { width: 45%; float: left;} +.right { margin-left:3%; } + ]]> + +

Before andSelf()

+

First Paragraph

Second Paragraph

-
]]> + + +
+

After andSelf()

+
+

First Paragraph

+

Second Paragraph

+
+
+]]>