gpt4 book ai didi

javascript - 脚本不适用于 FF

转载 作者:行者123 更新时间:2023-12-02 20:19:18 25 4
gpt4 key购买 nike

插件的代码是(我使用这个脚本 - http://www.tanabi.com/js/jquery.imagemap.js ):

if(typeof ev.originalTarget.actualPosX == 'undefined'){
jQuery.imagemap.ffGetPosition(ev.originalTarget);
}

我在 Firefox 上遇到错误 - ev.originalTarget 未定义,位于 86 行

和我的代码:

jQuery.fn.imagecoords = function() {
return this.each(function(){
jQuery(this).click(function(ev){
//var coords;
var x = jQuery.imagemap.getEventX(ev);
var y = jQuery.imagemap.getEventY(ev);
jQuery('#x').val(x+4);
jQuery('#y').val(y+2);
jQuery('#new_point').remove();
jQuery('#map').append('<a href="javascript:void(0)" id="new_point" class="bullet" rel="' + x + '-' + y + '" style="left: ' + x + 'px; top: ' + y + 'px; display: block; ">&nbsp;</a>');
return 0;
});
});
};

最佳答案

关于javascript - 脚本不适用于 FF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5814445/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com