jQuery加载函数在firefox中不起作用

时间:2015-02-25 13:50:43

标签: jquery load

任何人都可以帮我解决为什么在单击firefox时不能使用这个jquery加载函数?在Chrome中,Safari,Explorer运行良好,但firefox只加载字符......

这是我的代码:

    $(document).ready(function(){
       $("#load-references").click(function(){
        $('#result-references').load('references.html');
       }); 
     });

我正在使用许多外部javascripts,如jQuery,parallax,sticky-nav,responsive-nav,nav-hash等......这有关系吗?

我做错了什么?

以下是产生此问题的网站。该网站处于开发模式: http://vidu.hu/vidu_para/

点击“Megnézem”按钮,您可以在“Referenciák”菜单中找到firefox中的问题。

2 个答案:

答案 0 :(得分:0)

试试这个:

$("#load-references").on('click', function () {
   $('#result-references').load('references.html');
});

$(document).on('click','#load-references',function(event){
  $('#result-references').load('references.html');
});

答案 1 :(得分:0)

解析此JS文件时出现脚本错误 - http://vidu.hu/vidu_para/js/parallax-for-firefox.js。 文件下载正常,响应代码为200 OK,但文件内容无效,脚本代码无效。它正在返回一些垃圾文本。看看它并纠正:)

相关问题