Forum Moderators: open
Wondering how to do this as I'm not sure whether it's JQuery (v. 1.2.6-min) or the Lightbox plugin I'm trying to get working (which says it's IE6 compliant) that is causing ie6 to crash.
I've been told that conditional comments to include empty functions for IE6 is the way to do it, but I don't know how to try that out - any ideas?
Thanks
I'm not trying to include a specific javascript file for IE6 but rather exclude it as it's crashing the browser.
I'd post the plugin code, but I'm not sure if that would help - it's just the plugin 'jQuery Lightbox Plugin (balupton edition)'. The code I'm using to insert it into my page is:
<script type="text/javascript">
$j(function(){
$j.Lightbox.construct({
show_linkback:false,
download_link:false,
auto_scroll:"follow",
text: {
image:'Photo'
}
});
});
</script> I can't debug it on IE6 because it crashes before I get the chance and it seems fine using Firebug on a Mac (no errors)
...anything else I can do?
I'm also using:
var $j = jQuery.noConflict();
So that the Jquery library doesn't conflict with mootools (hence the code with $j above).
However, I've disabled both mootools and swfobject and they don't seem to affect IE6 performance. Only when I remove the Lightbox plugin does IE6 stops crashing.
I'm using the latest (1.2.6) Jquery and don't think there's anything else it could be conflicting with...
Line: 3
Char: 2
Error: 'document.getElementById(...)' is null or not an object
Code: 0
URL: [domain.com...]
But for the page that has the Lightbox plugin active, it displays this:
Line: 4
Char: 1
Error: Syntax error
Code: 0
URL: [domain.com...]
However, how can there be a syntax error if it's working fine in IE7 and all other browsers?
This is driving me mad
Thanks for all your advice so far (in this thread and others). What's strange, is that in the Lightbox plugin, there's no mention of getElementByID, despite IE6 displaying those error messages when in debug mode.
Could this be a problem IE6 has with the JQuery library itself? In all honesty, I'm really not bothered about IE6 users not being able to use the Lightbox feature as it's not essential to the functioning of my site. However, I do need to exclude the Lightbox Javascript from IE6 if I'm going to use it in other browsers.
This is SO confusing!
Hm...