GithubHelp home page GithubHelp logo

Comments (5)

mrodriguezr avatar mrodriguezr commented on June 2, 2024

Hi @luispuig, to reload the settings you can use scrollme.init()

from scrollme.

luispuig avatar luispuig commented on June 2, 2024

It works great. I was testing it on a wrong way. Thanks!

from scrollme.

luispuig avatar luispuig commented on June 2, 2024

I found the problem. What I wanted is on onload:

obj = $j('.someElement');
obj.addClass('animateme');
obj.addClass('scrollme');
obj.data('when','enter');
obj.data('from',0.75);
obj.data('to',0);
obj.data('opacity','0');
obj.data('translatex',400);

scrollme.init();

The problem is that properties are not catched. The solution is changing this:

			if( effect.element.is( '[data-opacity]' ) )    properties.opacity    = effect.element.data( 'opacity' );
			if( effect.element.is( '[data-translatex]' ) ) properties.translatex = effect.element.data( 'translatex' );
			if( effect.element.is( '[data-translatey]' ) ) properties.translatey = effect.element.data( 'translatey' );
			if( effect.element.is( '[data-translatez]' ) ) properties.translatez = effect.element.data( 'translatez' );
			if( effect.element.is( '[data-rotatex]' ) )    properties.rotatex    = effect.element.data( 'rotatex' );
			if( effect.element.is( '[data-rotatey]' ) )    properties.rotatey    = effect.element.data( 'rotatey' );
			if( effect.element.is( '[data-rotatez]' ) )    properties.rotatez    = effect.element.data( 'rotatez' );
			if( effect.element.is( '[data-scale]' ) )      properties.scale      = effect.element.data( 'scale' );
			if( effect.element.is( '[data-scalex]' ) )     properties.scalex     = effect.element.data( 'scalex' );
			if( effect.element.is( '[data-scaley]' ) )     properties.scaley     = effect.element.data( 'scaley' );
			if( effect.element.is( '[data-scalez]' ) )     properties.scalez     = effect.element.data( 'scalez' );

for this:
var properties = {};

			if( effect.element.data( 'opacity' ) )    properties.opacity    = effect.element.data( 'opacity' );
			if( effect.element.data( 'translatex' ) ) properties.translatex = effect.element.data( 'translatex' );
			if( effect.element.data( 'translatey' ) ) properties.translatey = effect.element.data( 'translatey' );
			if( effect.element.data( 'translatez' ) ) properties.translatez = effect.element.data( 'translatez' );
			if( effect.element.data( 'rotatex' ) )    properties.rotatex    = effect.element.data( 'rotatex' );
			if( effect.element.data( 'rotatey' ) )    properties.rotatey    = effect.element.data( 'rotatey' );
			if( effect.element.data( 'rotatez' ) )    properties.rotatez    = effect.element.data( 'rotatez' );
			if( effect.element.data( 'scale' ) )      properties.scale      = effect.element.data( 'scale' );
			if( effect.element.data( 'scalex' ) )     properties.scalex     = effect.element.data( 'scalex' );
			if( effect.element.data( 'scaley' ) )     properties.scaley     = effect.element.data( 'scaley' );
			if( effect.element.data( 'scalez' ) )     properties.scalez     = effect.element.data( 'scalez' );

Thanks

from scrollme.

luispuig avatar luispuig commented on June 2, 2024

Can anybody to help to do a pull request?

from scrollme.

Naransim avatar Naransim commented on June 2, 2024

Hello, I know this is an old question, but I tried with scrollme.init() and it didn't worked form me. I have some animated elements after a sliding object, every time I show the sliding object and colapse it again, the animated elements doesn't work like when the page was first loaded. I tried clearing the style attribute of those elements when the sliding object slides up or down and it worked.

from scrollme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.