Colorbox not showing up in IE

Hy,

i'm trying to use colorbox and it works great so far (in Chrome & Firefox), but just doesn't work in Internet Explorer (i have Version 9 [on Win7 64bit) and tried setting any version in the Developer Tools window, but none works).

I have tried a LOT of the suggestions that i found (doctype change/fix, console.__ not defined, ...) nothing works.

I get no unusual log output, i have tried my selector which i use to apply colorbox() via the developer tools console and it gets the right elements. The code also gets called (verified via log outputs).

1 thing i noticed which i found a little strange was that in Chrome colorbox generates this DOM entry at the end of the page:

<div id="colorbox" class="" style="display: none; padding-bottom: 42px; padding-right: 42px; ">

whereas IE gets this:

<div id="colorbox" class="" style="display: none;" >

but i couldn't find out why.

I have tried disabling any other css that i have, without any effect.

Answers


I finally found out what it was... My page should be HTML5 and i use Modernizr (javascript library which checks/fixes some HTML5 related stuff) i basically only use it to check via a media-query if the user has a small device (tablet/phone) or desktop.

The problem was somehow related to media-queries. Just embedding the modernizr library did no harm (without any calls to it). But as soon as i executed a media query via modernizr, colorbox no longer worked!

To test it i removed all calls to the modernizr library & the library --> Colorbox worked like a charm!

I now downloaded a slightly newer version of modernizr (i had 2.5.__ and updated to 2.6.1) and now Colorbox works even when using Modernizr!

This problem only affected Internet Explorer, so i am guessing it is/was a bug in the old Modernizr version which only occured in IE.

This cost me hours... so i guess my lesson learned is: don't ever use any JS libraries which you don't really need.


Need Your Help

How to transition Apple ID for iOS development to a different developer

ios xcode4 iphone-developer-program

I am leaving my current position at the end of the week. I'm a developer at a small-time shop, and my Apple ID is the only one attached to my soon-to-be ex-employer's Apple developer account. We do

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.