jQuery – Error: ‘null’ is null or not an object

Yes sorry, this isn’t Silverlight related at all, but it’s still nice to know, so I thought I would share.

I am currently doing a website that uses a “fancy” menu with a lot of jQuery. It were all working fine, until I added Lightbox2. Well, the product it self is working fine and is actually very nice, but when used together with jQuery, at least the combination of the versions I were using of both, it causes problems – “Error: ‘null’ is null or not an object”.

To make a long story short, I found the problem. A script that comes from the lightbox2 overwrites the jQuery “$” sign, which isn’t good and makes this error appear. Luckily there is a very easy fix for this.

Replace “$()” with “jQuery()” – and now your running again, at least I were. Hope this helps you too.

– Enjoy!