Explorar o código

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

Frederic G. MARAND %!s(int64=8) %!d(string=hai) anos
pai
achega
592e05d2db
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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');
+  });
 });