0
我有一个问题与JS(我使用jQuery的cookie)。 我想在几秒钟后显示一个div。而当它应该在firbug显示我得到一个错误,指出:JavaScript和Cookies
ReferenceError: showIt is not defined
setTimeout('showIt()', 60000); // after 8 min
这是我cookie.js coode
$(function() {
function showIt() {
$('#buy').show();
}
//cookie
if ($.cookie('sls') == 'true') {
showIt();
} else {
setTimeout('showIt()', 60000); // after 8 min
}
$.cookie('sls', 'true');
});
感谢您的支持
谢谢!有用! – 2014-10-30 07:55:20