Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

"auto" marginLeft and marginTop cause errors in IE8


Project:popeye - an inline lightbox alternative
Version:1.0
Component:Code
Category:bug report
Priority:critical
Assigned:herr-schuessler
Status:won't fix
Description

My IE8 was throwing a javascript error “jQuery invalid argument line 12″ and it looks like it’s because of the jQuery css() calls in the popeye init() method. I changing that block of code in your plugin to the below, and it seems to have fixed it. IE8 was returning “auto” for “marginLeft” and “marginTop”, while Firefox was returning “0px”. The "auto" value was causing parseInt() to return NaN which I guess is causing IE to freak out and throw an error.

I changed the relevant lines in the init() method of the plugin to the following (which seems to have fixed it so far):

var strMarginTop = obj.css(’marginTop’);
if (strMarginTop == ‘auto’) {
strMarginTop = ‘0′;
}
var strMarginLeft = obj.css(’marginLeft’);
if (strMarginLeft == ‘auto’) {
strMarginLeft = ‘0′;
}

var imTop = obj.offset().top – parseInt(strMarginTop, 10);
var imLeft = obj.offset().left – parseInt(strMarginLeft, 10);

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#1

Thank you very much for this information.
Good post thanks for sharing.
I like this site ;)
-----------
çerçeve çerçeve
web tasarım web tasarım
sohbet sohbet odaları
sohbet odaları
horlama horlama tedavisi
çet çet
sohbet odaları sohbet odaları
mirc mir
mırc mırc
-----------

#2

Assigned to:Anonymous» herr-schuessler
Status:active» won't fix

dropped support for 1.0

#3

iPad Video Converter is then designed for iPad fans to convert videos to iPad. This special ipad video converter can convert all video formats to iPad compatible formats. ipad converter| DVD to ipad| ipad to Mac transfer| ipad to computer transfer| ipad transfer| ipad to epub|
iPad Converter|

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.