views:

306

answers:

2

hi in FF and chrome, safari it is of course totally fine.. IE8 however, in compatability mode or not, doesnt load the overlay over the top (it just sits a t the top, scrolling the content down - although i guess this is because the overlay is at the top of the markup).. and it doesnt show the image im attempting to show , but shrinks the overlay loading image to nothin inthe top left of the screen.. i am using the standard colorbox-min and the css that goes with that.. inspecting the markup in the IE8 dev tools seems to hint that the content is not actually loaded into the cboxLoadedContent div..

anyone have any ideas.. ? i expect my explanation is not great, so maybe i could take a movie of it or something if needed. either way any help greatly appreciated

nat

A: 

Is your code wrapped in a ready function? I've seen instances where code that works in FF/Safari fails in IE because IE seems to load the DOM more slowly. In those cases it almost always turns out that I've failed to wrap the code in a ready function.

$(function() { // the important bit
    $('.colorbox').load('...').colorbox();
});
tvanfosson
hi , thanks for the reply...no sadly its in a ready $(document).ready(function() { $('a[rel="preview"]').colorbox({ photo: true, maxWidth: '95%', maxHeight: '95%', photoScaling: true });});basically the page is a list of media images.. and when you click one it gives you the preview and allows you to scroll through ones on the page.. well it does in FFtook a little screenshot as it was shrinking the overlay thingyhttp://www.dumpt.com/img/viewer.php?file=7s2zwoxozzf7666h0fzc.pngso that is getting smaller to nothing, then that is all it does
nat
@nat - Perhaps it's not waiting on the images to load and calculating sizes incorrectly in IE? Try something simple, like delaying the set up for a minute (to give the images a chance to load). `$('a...').delay(60000)...` or setTimeout( function() { $('a...') }, 600000 );` If that works, then you may need to adjust your code to either detect when the images are loaded or use a container with some minimum size.
tvanfosson
@nat s/600000/60000/g
tvanfosson
ok i have now replaced the colorbox js and css, and it may in fact be a css problem, although i cant see whyusing completely standard bits..using the new standard css the image does actually load, but overlay dies and some other bits dont look quite righthow i hate IE is absolute rubbishthanks v much for your help and suggestions
nat
A: 

Try an XHTML strict doctype...?

danp