doc: create anchor link before doing hide header if needed

This commit is contained in:
Mathieu Virbel 2011-01-31 22:42:39 +01:00
parent 85abba014c
commit 6dc1eb2536
1 changed files with 8 additions and 8 deletions

View File

@ -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');
$('<div></div>').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');
$('<div></div>').attr('id', eid).addClass('anchor').insertBefore(e);
});
});
});