You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
514 B
17 lines
514 B
6 years ago
|
(function ($, Drupal, drupalSettings) {
|
||
|
Drupal.behaviors.mtCountTo = {
|
||
|
attach: function (context, settings) {
|
||
|
$(context).find('[data-to]').once('mtCountToInit').each(function() {
|
||
|
var stat_item = $(this);
|
||
|
var waypoints = stat_item.waypoint(function(direction) {
|
||
|
var animatedObject = $(this.element);
|
||
|
animatedObject.countTo();
|
||
|
this.destroy();
|
||
|
},{
|
||
|
offset: "90%"
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
})(jQuery, Drupal, drupalSettings);
|