summaryrefslogtreecommitdiff
path: root/lib/rdoc/generator/template/darkfish/js/darkfish.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/generator/template/darkfish/js/darkfish.js')
-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js
index 84565c1e2d..7a2f44c765 100644
--- a/lib/rdoc/generator/template/darkfish/js/darkfish.js
+++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js
@@ -73,13 +73,15 @@ function hookQuickSearch() {
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( '<div class="target-section"></div>' );
- } 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( '<div class="target-section"></div>' );
+ } else {
+ console.debug( "Already wrapped." );
+ }
}
});
};