2013-02-28 17:09:11 +00:00
|
|
|
<div id="module-funcs"></div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
jQuery.fn.local_toc = function(tgt_sel) {
|
|
|
|
var tgt = jQuery(tgt_sel);
|
|
|
|
|
|
|
|
tgt.append('<h4>Table of Contents</h4>');
|
|
|
|
|
2014-10-08 15:23:22 +00:00
|
|
|
tgt.append('<ul></ul>');
|
2013-02-28 17:09:11 +00:00
|
|
|
jQuery('dt .headerlink').each(function(idx, elem) {
|
|
|
|
|
|
|
|
var i = [
|
|
|
|
'<li><a href="', elem.href, '">',
|
|
|
|
last(elem.href.split('.')),
|
|
|
|
'</a></li>']
|
|
|
|
.join('');
|
|
|
|
|
2014-10-08 15:23:22 +00:00
|
|
|
jQuery(tgt_sel + '> ul').append(i);
|
2013-02-28 17:09:11 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
function last(list) {
|
|
|
|
return list[list.length - 1];
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
;(function($) {
|
|
|
|
$.fn.local_toc('#module-funcs');
|
|
|
|
})(jQuery);
|
|
|
|
</script>
|