Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Failed to execute 'getComputedStyle' on 'Window' #22

Open
ghost opened this issue Sep 9, 2016 · 1 comment
Open

TypeError: Failed to execute 'getComputedStyle' on 'Window' #22

ghost opened this issue Sep 9, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 9, 2016

I'm getting an javascript type error:

TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

I use the latest (1.0.4) minified version of flexImages and use it like this:

$('.flex-images').flexImages({ rowHeight: 150 });

The Error occurs in Win10 and Linux Mint Chrome Browser (Version 53.0.2785.101 64-bit)

The issue seems to be in row 13 (uncompressed version) of the code:

s = window.getComputedStyle ? getComputedStyle(containers[0], null) : containers[0].currentStyle;

Any ideas or fixes?

@STandQdotcom
Copy link

STandQdotcom commented Jan 27, 2017

the default class for item container is 'items' as listed here: https://goodies.pixabay.com/jquery/flex-images/demo.html

For example:

where div is container for image and has a class "item"

You might get above error if you don't have item class added. Alternatively you can set your own container class using 'container' property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant