Better variable name
authorColeman Watts <coleman@civicrm.org>
Tue, 16 Apr 2019 20:40:36 +0000 (16:40 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 18 Apr 2019 13:54:15 +0000 (09:54 -0400)
js/crm.wordpress.js

index eb8a0b3997907ec208682a7a80ca9badb9c9f120..81b433e65f19169439085017bfd25846d5e71ca3 100644 (file)
@@ -10,12 +10,12 @@ CRM.$(function($) {
     });
   // Prevent screen reader shortcuts from changing the document hash and breaking angular routes
   $('a.screen-reader-shortcut').click(function() {
-    var href = $(this).attr('href');
+    var target = $(this).attr('href');
     // Show toolbar if hidden
-    if (href === '#wp-toolbar' && CRM.menubar.position === 'over-cms-menu') {
+    if (target === '#wp-toolbar' && CRM.menubar.position === 'over-cms-menu') {
       CRM.menubar.togglePosition(false);
     }
-    $(href).focus();
+    $(target).focus();
     return false;
   });
   $('<a href="#crm-qsearch-input" class="screen-reader-shortcut">' + ts("Open CiviCRM Menu") + '</a>')