我试图让jReject在我的网站http://goo.gl/YbW2xb上工作,但由于某些原因无法让它工作。
这是我做的,你能告诉我缺少什么/我做错了什么?我怀疑这来自<script>
部分。
<head>
标记中调用它:jquery.reject.css和jquery.browser.min.js和jquery.reject.js 2在</head>
<script>
$.reject({
reject: { all: true }, // Reject all renderers for demo
header: 'Your browser is not supported here', // Header Text
paragraph1: 'You are currently using an unsupported browser', // Paragraph 1
paragraph2: 'Please install one of the many optional browsers below to proceed',
closeMessage: 'Close this window at your own demise!' // Message below close window link
}); // Customized Text
return false;
});
</script>
答案 0 :(得分:0)
首先你不是在调用你的脚本,至少你可以简单地调用dom ready函数。 您还需要在此函数之前调用jquery
$( document ).ready(function() {
$.reject({
reject: { all: true }, // Reject all renderers for demo
header: 'Your browser is not supported here', // Header Text
paragraph1: 'You are currently using an unsupported browser', // Paragraph 1
paragraph2: 'Please install one of the many optional browsers below to proceed',
closeMessage: 'Close this window at your own demise!' // Message below close window link
}); // Customized Text
return false;
});