Console.log under IE6/7/8 will report an error, and the error message is “ConsoleIs undefined” solution!
js code:
$(#slides).superslides({
Inherit_width_from:.wide-container,
INHERIT_HEIGHT_FROM:.wide-container,
HashChange: False,
play: 7000
});
$(#slides).on(mouseenter, function() {
$(this).superslides(stop);
console.log(Stopped)
});
$(#slides).on(mouseleave, function() {
$(#slides)..superslides(startch);
console.log(startedled)
});
Modified js code:
// avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods =[
assert,clear,poll,debug,DIR,dirxml,Error,
Exception,group,GroupCollapsed,Groupend,info,log,
marktimeline,Profile,Profileend,table,time,Timeend,
timestamp,trace,warn
]#atfp_close_translate_span#;
var length = methods.length;
var console = (window.console = window.console || {});
while (length–) {
method = methods[length];
// only stub undefined methods.
if (!console[method]) {
Console[method]= noop;
}
}
}());
$(#slides).superslides({
Inherit_width_from:.wide-container,
INHERIT_HEIGHT_FROM:.wide-container,
HashChange: False,
play: 7000
});
$(#slides).on(mouseenter, function() {
$(this).superslides(stop);
console.log(Stopped)
});
$(#slides).on(mouseleave, function() {
$(#slides)..superslides(startch);
console.log(startedled)
});
The added code is quoted from:http://stackoverflow.com/questions/3326650/console-is-undefined-error-for-internet-explorer,以解决在调试的时候IE低版本浏览器弹出错误提示的问题!
