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

move in not defined #62

Open
ZigaVukcevicDev opened this issue Dec 7, 2014 · 3 comments
Open

move in not defined #62

ZigaVukcevicDev opened this issue Dec 7, 2014 · 3 comments
Assignees

Comments

@ZigaVukcevicDev
Copy link

Hi,

I am having difficulties to set up move.js

Here is my code:

<script src="<?php echo base_url('assets/js/lib/jquery-1.11.1.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/move.min.js'); ?>"></script>

and

$('.some_selector').on('click', function() {
  move('.some_selector')
    .duration(1000)
    .set('opacity', 1)
    .add('left', 500)
    .end();
});

I am getting following errors:

move.min.js:1 Uncaught TypeError: Cannot read property 'style' of null
main.js:60 Uncaught ReferenceError: move is not defined

Can you please provide some assistance?

@benweet
Copy link

benweet commented Jan 1, 2015

Same problem here. Resolved by including the script tag in the body instead of the head of the html.

@frkd-dev
Copy link

When MoveJS included before body element it fails to initialize, because it tries to access document.body.style which isn't yet created. Strange that such behavior is not covered by docs.

@michahell
Copy link

Confirmed, moving script tag to body resolved it indeed.

@A A self-assigned this Dec 6, 2015
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

5 participants