views:

54

answers:

2

The below code renders an invalid argument error when the the prepend method tries to execute

// close button
closers = overlay.find(conf.close || ".close");

if (!closers.length && !conf.close) {
    closers = $('<div class="close"></div>');
    overlay.prepend(closers);
}

This is part of the jquery.overlay.js and the error is only happening in IE7. Works fine in IE8, FireFox and Chrome. I've used alerts to verify that closers and overlay are both valid objects. Has anyone encountered this same error before? Any ideas on troubleshooting within IE7?

Any ideas are greatly appreciated.

A: 

try a string instead of a jQuery object:

closers = '<div class="close"></div>';
overlay.prepend(closers);
closers = $(closers);

I don't know if it works or why it should work :-)
But try it and tell me if it worked...

elektronikLexikon
this worked for our local testing with IE7 and IE8! I will update this topic once deployed and tested on our integration testing and QA environments. THanks for your suggestion!
Jansu
A: 

your answer resolved the problem.

Jansu