$()

in source/javascripts/home.js [16:50]


$(function () {
  var $slider = $('#js-testimonials-slider');

  if ($slider.length) {
    $slider.slick({
      arrows: false,
      autoplay: true,
      autoplaySpeed: 5000,
      dots: true
    });
  }

  var $community = $('#js-landing-community');

  if ($community.length) {
    // Get JSON
    $.getJSON('team.json', function (d) {
      var team = shuffle(d.concat(d.concat(d)));

      $.each(team, function () {
        var $img = $('<img />', {
          src: 'images/team/' + this.picture
        });
        $img.on('load', function () {
          var $this = $(this);
          setTimeout(function () {
            $this.addClass('is-loaded');
          }, 1000);
        });

        $community.append($('<div class="community-image">').append($img));
      });
    });
  }
});