Sha256: feb9c39194fb30ac35f436bea922619d7521e784f47cbb5431712dea59102c5c

Contents?: true

Size: 568 Bytes

Versions: 6

Compression:

Stored size: 568 Bytes

Contents

function toggleSource( id )
{
  var src = $('#' + id).toggle();
  var isVisible = src.is(':visible');
  $('#l_' + id).html(isVisible ? 'hide' : 'show');
  if (!src.data('syntax-higlighted')) {
    src.data('syntax-higlighted', 1);
    hljs.highlightBlock(src[0]);
  }
}

window.highlight = function(url) {
  var hash = url.match(/#([^#]+)$/)
  if(hash) {
    $('a[name=' + hash[1] + ']').parent().effect('highlight', {}, 'slow')
  }
}

$(function() {
  highlight('#' + location.hash);
  $('.description pre').each(function() {
    hljs.highlightBlock(this);
  });
});

Version data entries

6 entries across 4 versions & 1 rubygems

Version Path
sdoc-0.3.4 lib/rdoc/generator/template/sdoc/resources/js/main.js
sdoc-0.3.4 lib/rdoc/generator/template/rails/resources/js/main.js
sdoc-0.3.3 lib/rdoc/generator/template/sdoc/resources/js/main.js
sdoc-0.3.3 lib/rdoc/generator/template/rails/resources/js/main.js
sdoc-0.3.2 lib/sdoc/generator/template/direct/resources/js/main.js
sdoc-0.3.1 lib/sdoc/generator/template/direct/resources/js/main.js