Skip to content

Commit

Permalink
- retain href attribute for focus navigation but also prevent default…
Browse files Browse the repository at this point in the history
… click action on anchor tag
  • Loading branch information
itb2k13 committed May 10, 2018
1 parent c2b68a7 commit 1558c3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery-pughound.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
counter.classList.add($ns('-counter'));
counter.classList.add(plugin.customclass());
if(!plugin.cfg('onanchorclick')) {anchor.href = (item.url.first() == '/') ? item.url : plugin.cfg('urlformatting') ? plugin.cfg('urlformatting')(item.url) : item.url;}
if(plugin.cfg('onanchorclick')) {anchor.onclick = function(){plugin.cfg('onanchorclick').call(null, item);};}
if(plugin.cfg('onanchorclick')) {anchor.href = '#'; anchor.onclick = function(){plugin.cfg('onanchorclick').call(null, item); return false;}}
anchor.appendChild(text);
if(plugin.cfg('showcounts',$bool)){anchor.appendChild(counter);}
att.value = i;
Expand Down

0 comments on commit 1558c3b

Please sign in to comment.