Browse Source

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

Frederic G. MARAND 8 năm trước cách đây
mục cha
commit
592e05d2db
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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');
+  });
 });