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

Error className of null #36

Closed
pimeo opened this issue May 21, 2014 · 2 comments
Closed

Error className of null #36

pimeo opened this issue May 21, 2014 · 2 comments

Comments

@pimeo
Copy link

pimeo commented May 21, 2014

Hey !
I turn around in my seat for an hour... I have a weird problem i can't understand.

My main goal is to use the slider with masonry to add a custom gallery view popin.
On my localhost, I instanciate the plug-in and it works.
I'm putting my code on production and my my chrome crash on this error :

Uncaught TypeError: Cannot read property 'className' of null (slidr.js:69)
classname slidr.js:69
controls.update slidr.js:680
actions.start slidr.js:1140
api.start slidr.js:1268
(anonymous function)

I was thinking about a code conflict with my others js scripts but same scripts work well on localhost. I'm using Chrome and I do not know what to do...

I have no idea about this problem i'm trying to resolve...
Thanks !

@bchanx
Copy link
Owner

bchanx commented May 21, 2014

Hey @pimeo,

Are you minifying any javascript when running in production?
Are you sure the element(s) in the Slidr are correctly instantiated before you call .start()? Maybe some other issues in your production code that's cascading its error to slidr?
Have you given slidr.min.js a try?

@pimeo
Copy link
Author

pimeo commented May 21, 2014

I solve the problem by checking if my elements were inside my slider DOM. It was the case but they weren't tagged by data-slidr attributes, and that caused the classname error. I was guilty !
Thank for help !

@pimeo pimeo closed this as completed May 21, 2014
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

2 participants