Kaynağa Gözat

Listing 5.17: add position:relative to pull-quote parents to prepare positioning.

Frederic G. MARAND 8 yıl önce
ebeveyn
işleme
592e05d2db
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      Chapter 5/05.js

+ 6 - 0
Chapter 5/05.js

@@ -39,4 +39,10 @@ $(document).ready(function () {
       ].join(''))
       .wrap('<li id="footnote-' + (index + 1) + '"></li>');
   });
+
+  // Style pull quotes.
+  $('span.pull-quote').each(function (index) {
+    var $parentParagraph = $(this).parent('p');
+    $parentParagraph.css('position', 'relative');
+  });
 });