1( function( $ ) { 2 /** 3 * @param $scope The Widget wrapper element as a jQuery element 4 * @param $ The jQuery alias 5 */ 6 var WidgetCTCounterHandler = function( $scope, $ ) { 7 elementorFrontend.waypoint($scope.find('.ct-counter-number-value'), function () { 8 var $number = $(this), 9 data = $number.data(); 10 11 var decimalDigits = data.toValue.toString().match(/\.(.*)/); 12 13 if (decimalDigits) { 14 data.rounding = decimalDigits[1].length; 15 } 16 17 $number.numerator(data); 18 }, { 19 offset: '95%', 20 triggerOnce: true 21 }); 22 }; 23 24 // Make sure you run this code under Elementor. 25 $( window ).on( 'elementor/frontend/init', function() { 26 elementorFrontend.hooks.addAction( 'frontend/element_ready/ct_counter.default', WidgetCTCounterHandler ); 27 elementorFrontend.hooks.addAction( 'frontend/element_ready/ct_banner.default', WidgetCTCounterHandler ); 28 elementorFrontend.hooks.addAction( 'frontend/element_ready/ct_point.default', WidgetCTCounterHandler ); 29 } ); 30} )( jQuery );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.