From 6dc1eb253671ed8aaebaa3e948996014e4936ae1 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Mon, 31 Jan 2011 22:42:39 +0100 Subject: [PATCH] doc: create anchor link before doing hide header if needed --- doc/sources/.static/kivy.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/sources/.static/kivy.js b/doc/sources/.static/kivy.js index 4e16d5204..cd08d2971 100644 --- a/doc/sources/.static/kivy.js +++ b/doc/sources/.static/kivy.js @@ -26,6 +26,14 @@ function showheader() { $(document).ready(function () { + $(['div.section[id]', 'dt[id]']).each(function(i1, elem) { + $(elem).each(function(i2, e) { + var eid = $(e).attr('id'); + $(e).removeAttr('id'); + $('
').attr('id', eid).addClass('anchor').insertBefore(e); + }); + }); + st = $.cookie('kivy.header') if ( st == 'hide' ) hideheader(); @@ -38,12 +46,4 @@ $(document).ready(function () { hideheader(true); }); - - $(['div.section[id]', 'dt[id]']).each(function(i1, elem) { - $(elem).each(function(i2, e) { - var eid = $(e).attr('id'); - $(e).removeAttr('id'); - $('
').attr('id', eid).addClass('anchor').insertBefore(e); - }); - }); });