Skip to content

Conversation

@gpeto91
Copy link

@gpeto91 gpeto91 commented Nov 4, 2016

As requested in #38

Initialization no longer occurs automatically. You need to declare a variable in your js, passing the scrollme object as value and call the init () method manually. The init function now receives a "disable_on_mobile" parameter to prevent the animations when mobile. Also added function to check whether it is a mobile device or not.

eg.:

script.js

    var s = scrollme;
    $(document).on( s.init_events.join(  ' '  ), function() { s.init("disable_on_mobile") } );

The parameter must be exactly the string "disable_on_mobile" or it will throw an error. Also if you want the plugin to work normally on mobile, just call the s.init() function without the parameter.

…variable in your js, passing the scrollme object as value and call the init () method manually. The init function now receives a disable_on_mobile parameter to prevent the animations when mobile. Also added function to check whether it is a mobile device or not.
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

Successfully merging this pull request may close these issues.

1 participant