From 6d0647c3508b381e3dec2616faca75d2fd338088 Mon Sep 17 00:00:00 2001 From: drbrain Date: Wed, 6 Feb 2013 08:05:44 +0000 Subject: * lib/rdoc: Import RDoc 4.0.0.rc.2 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/generator/template/darkfish/js/darkfish.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/rdoc/generator/template/darkfish/js/darkfish.js') diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js index 4be722fac3..f26fd45d3a 100644 --- a/lib/rdoc/generator/template/darkfish/js/darkfish.js +++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js @@ -109,13 +109,15 @@ function hookSearch() { function highlightTarget( anchor ) { console.debug( "Highlighting target '%s'.", anchor ); - $("a[name=" + anchor + "]").each( function() { - if ( !$(this).parent().parent().hasClass('target-section') ) { - console.debug( "Wrapping the target-section" ); - $('div.method-detail').unwrap( 'div.target-section' ); - $(this).parent().wrap( '
' ); - } else { - console.debug( "Already wrapped." ); + $("a[name]").each( function() { + if ( $(this).attr("name") == anchor ) { + if ( !$(this).parent().parent().hasClass('target-section') ) { + console.debug( "Wrapping the target-section" ); + $('div.method-detail').unwrap( 'div.target-section' ); + $(this).parent().wrap( '
' ); + } else { + console.debug( "Already wrapped." ); + } } }); }; -- cgit v1.2.3