Created
April 7, 2012 10:26
-
-
Save jdlrobson/2327272 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/MobileFormatter.php b/MobileFormatter.php | |
index 69f4fcc..34e8260 100644 | |
--- a/MobileFormatter.php | |
+++ b/MobileFormatter.php | |
@@ -193,7 +193,7 @@ class MobileFormatter extends HtmlFormatter { | |
$backToTop = $this->msg( 'mobile-frontend-back-to-top-of-section' ); | |
$this->headings++; | |
// Back to top link | |
- $base = Html::openElement( 'div', | |
+ $backToTop = Html::openElement( 'div', | |
array( 'id' => 'anchor_' . intval( $this->headings - 1 ), | |
'class' => 'section_anchors', | |
) | |
@@ -217,7 +217,7 @@ class MobileFormatter extends HtmlFormatter { | |
array( 'class' => 'section_heading hide', 'section_id' => $this->headings ), | |
$hide | |
); | |
- $base .= Html::openElement( 'div', array( 'class' => 'section' ) ); | |
+ $base = Html::openElement( 'div', array( 'class' => 'section' ) ); | |
if ( $this->expandableSections ) { | |
$h2OnClick = 'javascript:wm_toggle_section(' . $this->headings . ');'; | |
$base .= Html::openElement( 'h2', | |
@@ -243,6 +243,7 @@ class MobileFormatter extends HtmlFormatter { | |
if ( $this->headings > 1 ) { | |
// Close it up here | |
$base = '</div>' // <div class="content_block"> | |
+ . $backToTop | |
. "</div>" // <div class="section"> | |
. $base; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment