I have tried to search this but to no avail. The code i have was supplied by a real nice guy on the site and then I modded the attributes to make the elements i had fit into where they needed to go, however, everything works fine in all browsers, that is, except IE - pretty much all versions. i ran the debug in IE9 and was given this error "
SCRIPT438: Object doesn't support property or method 'debug'
The section of code that it refers to is this
function resizeContent() {
// Retrieve the window width
var viewPortWidth = $(document).width();
var viewPortHeight = $(document).height();
$(".content").each(function(index, element) {
var jElement = $(this);
if (jElement.hasClass(currentContentColor)) {
console.debug('resize content selected (' + (viewPortWidth - 160) + ')');
// If current content, juste resize the width and height
jElement.css({
width: (viewPortWidth - 160) + "px",
height: viewPortHeight + "px"
});
}
else {
console.debug('resize content (' + (viewPortWidth - 160) + ')');
// If not current content, resize with, height and left position
// (keep content outside)
jElement.css({
width: (viewPortWidth - 160) + "px",
left: viewPortWidth + "px",
height: viewPortHeight + "px"
});
}
});
}
The Specific line in question is
console.debug('resize content (' + (viewPortWidth - 160) + ')');
Or at least that's what IE says is the issue
Is there a work around for this issue and IE - i am learning slowly - but this is way beyond anything i know. I have searched google and on here for the debug error but couldn't find anything.
The site is
Thank you in advance for any help you can give on this issue.
I have tried to search this but to no avail. The code i have was supplied by a real nice guy on the site and then I modded the attributes to make the elements i had fit into where they needed to go, however, everything works fine in all browsers, that is, except IE - pretty much all versions. i ran the debug in IE9 and was given this error "
SCRIPT438: Object doesn't support property or method 'debug'
The section of code that it refers to is this
function resizeContent() {
// Retrieve the window width
var viewPortWidth = $(document).width();
var viewPortHeight = $(document).height();
$(".content").each(function(index, element) {
var jElement = $(this);
if (jElement.hasClass(currentContentColor)) {
console.debug('resize content selected (' + (viewPortWidth - 160) + ')');
// If current content, juste resize the width and height
jElement.css({
width: (viewPortWidth - 160) + "px",
height: viewPortHeight + "px"
});
}
else {
console.debug('resize content (' + (viewPortWidth - 160) + ')');
// If not current content, resize with, height and left position
// (keep content outside)
jElement.css({
width: (viewPortWidth - 160) + "px",
left: viewPortWidth + "px",
height: viewPortHeight + "px"
});
}
});
}
The Specific line in question is
console.debug('resize content (' + (viewPortWidth - 160) + ')');
Or at least that's what IE says is the issue
Is there a work around for this issue and IE - i am learning slowly - but this is way beyond anything i know. I have searched google and on here for the debug error but couldn't find anything.
The site is http://www.crazyedits.co.uk
Thank you in advance for any help you can give on this issue.
Share Improve this question asked Oct 31, 2012 at 12:56 Tony 'Sh4rk' WillisTony 'Sh4rk' Willis 873 silver badges10 bronze badges 2- I think you can ment that line out because it's just for your information or just instead of console.debug you could use console.log – rain01 Commented Oct 31, 2012 at 13:05
- ^^ yep that worked. I really need to get my head around js and fast - I feel like my site is being built by all you guys instead of myself :( – Tony 'Sh4rk' Willis Commented Oct 31, 2012 at 13:07
1 Answer
Reset to default 8According to the documentation, console.debug
has been deprecated; console.log
should be used instead.
An alias for log(); this was added to improve patibility with existing sites already using debug(). However, you should use console.log() instead.
In any case, debug
and log
are just for printing debugging information to the console - they should be removed from production code.