mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
修复 A 标签没有 href 属性时 link 值为 null 语法错,导致部分 A 标签事件不响应
This commit is contained in:
parent
cc4e2915ec
commit
a6800eef96
|
@ -3,6 +3,9 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
$(document).on("click","a",function(event) {
|
$(document).on("click","a",function(event) {
|
||||||
var link = $(this).attr("href");
|
var link = $(this).attr("href");
|
||||||
|
if ('string' != typeof(link)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(link.indexOf(":")>=0){
|
if(link.indexOf(":")>=0){
|
||||||
emitClickedEvent(link);
|
emitClickedEvent(link);
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue