Js Waypoint + animate at offset

292 views Asked by At

I have a problem with my JS.

I use waypoint + animate.css and when I write my script, this script broke all script.

Here is the HTML code:

<div id="elementanime1" class="col-sm-4 center">
    <div class="cercle-droite circle jaune-transparent">
        <div class="circle-inner">
            <div class="score-text">
                <h3 class="sous-titre-section-clair trait-s-t-clair">Events<br/>et congrès</h3>
                <a class="bouton-jaune" id="show-events-congres"><i class="fa fa-plus-circle"></i> En savoir plus</a>
            </div>
        </div>
    </div>
</div><code>

The Js:

(function($){
    $(document).ready(function(){

      // hide our element on page load
      $('#elementanime1').addClass('fade');

      $('#elementanime1').waypoint(function() {
          $('#elementanime1').addClass('fadeInLeft');
      }, { offset: '50%' });

}})(jQuery);

The website link www.pier17.fr/la-fonderie

Can you help me please?

1

There are 1 answers

0
Sebastian Nette On BEST ANSWER

You just forgot the closed parenthesis at the end of document.ready

(function($){
    $(document).ready(function(){

        // hide our element on page load
        $('#elementanime1').addClass('fade');

        $('#elementanime1').waypoint(function() {
            $('#elementanime1').addClass('fadeInLeft');
        }, { offset: '50%' });

    });
})(jQuery);