【发布时间】:2016-05-03 09:51:31
【问题描述】:
在ie8 jquery中报错(属性'$'的值为null或undefined,不是Function对象)
这个错误只出现在 ie8 中,chrome 和 firefox 工作正常。
$(document).ready(function (e) {
$('#otp').bind("cut copy paste", function (e) {
e.preventDefault();
});
$('#dropdown').on('click', function () {
$('.dropdownwrap').slideToggle();
});
$(window).load(function () {
$('#preloader').fadeOut('slow', function () {
$(this).remove();
});
});
});
【问题讨论】:
-
如果你使用的是jquery 2.* 那么在ie8下就不行了,你需要使用版本1.*:jquery.com/browser-support
标签: javascript jquery internet-explorer-8