1 $(document).ready(function()
6 $('pre:not(.debug) code').each(function()
8 $(this).addClass('brush: php, class-name: highlighted');
11 SyntaxHighlighter.config.tagName = 'code';
12 // Don't show the toolbar or line-numbers.
13 SyntaxHighlighter.defaults.gutter = false;
14 SyntaxHighlighter.all();
16 // Any link that has the current page as its href should be class="current"
17 $('a[href="'+ window.location.pathname +'"]').addClass('current');
20 $('#kodoc-breadcrumb li.last').each(function()
23 var $topics = $('#kodoc-topics li').has('a.current').slice(0, -1);
25 $topics.each(function()
27 // Create a copy of the menu link
28 var $crumb = $(this).children('a:first, span:not(.toggle):first').clone();
30 // Insert the menu link into the breadcrumbs
31 $('<li></li>').html($crumb).insertBefore($this);
37 $('#kodoc-main .method-source').each(function()
40 var togg = $(' <a class="sourcecode-toggle">[show]</a>').appendTo($('h4', self));
41 var code = self.find('pre').hide();
43 togg.toggle(function()
46 code.stop(true, true).slideDown();
51 code.stop(true, true).slideUp();
55 // "Link to this" link that appears when you hover over a header
57 .find('h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]')
60 return '<a href="#' + $this.attr('id') + '" class="permalink">link to this</a>';