summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/page.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/scripts/page.js b/lib/scripts/page.js
index 5da4a9cc0..6e7d7faf7 100644
--- a/lib/scripts/page.js
+++ b/lib/scripts/page.js
@@ -96,26 +96,26 @@ dw_page = {
* Adds the toggle switch to the TOC
*/
initTocToggle: function() {
- var $header, $clicky, $toc, $tocul, setClicky;
- $header = jQuery('#toc__header');
+ var $wrapper, $header, $clicky, $toc, $tocul, setClicky;
+ $wrapper = jQuery('#dw__toc');
+ $header = jQuery('h3', $wrapper);
if(!$header.length) {
return;
}
- $toc = jQuery('#toc__inside');
- $tocul = $toc.children('ul.toc');
+ $toc = jQuery('div', $wrapper).first();
+ $tocul = jQuery('ul', $toc);
setClicky = function(hiding){
if(hiding){
$clicky.html('<span>+</span>');
- $clicky[0].className = 'toc_open';
+ $wrapper.addClass('close').removeClass('open');
}else{
$clicky.html('<span>&minus;</span>');
- $clicky[0].className = 'toc_close';
+ $wrapper.addClass('open').removeClass('close');
}
};
- $clicky = jQuery(document.createElement('span'))
- .attr('id','toc__toggle');
+ $clicky = jQuery(document.createElement('strong'));
$header.css('cursor','pointer')
.click(function () {
var hidden;