GithubHelp home page GithubHelp logo

Not working with AngularJS about scrollme HOT 5 OPEN

nckprsn avatar nckprsn commented on June 9, 2024
Not working with AngularJS

from scrollme.

Comments (5)

newkolay avatar newkolay commented on June 9, 2024 2

I had the same issue, the solution that worked for me:
1.Inside the directive use jQuery function $.getScript to load scrollme.js asynchronously
2. Find in scrollme.js this line
$document.on( _this.init_events.join( ' ' ) , function(){ _this.init(); } );
and replace it with
_this.init();

from scrollme.

simonh1000 avatar simonh1000 commented on June 9, 2024

I am having the same issue. With another jquery plugin I used a directive to run the 'init' function after the angular component had loaded, but can't work out what the parallel would be in this case

from scrollme.

sheriffderek avatar sheriffderek commented on June 9, 2024

I'm guessing that scrollme figures out the heights of it's scrollme sections / and that it's doing it before your app is built. Try running it in the ready: function({}), hook in your app.js - or running it after the dom is built in each directive or view template render hook - whatever that may be, for angular.

from scrollme.

resao avatar resao commented on June 9, 2024

@kolya3001 This did the trick for me, thank you!

from scrollme.

resao avatar resao commented on June 9, 2024

@kolya3001 In fact I didn't even need to asynchronously load the scrollme.js, simply changing the line in your second point was enough

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.