1( function( $ ) { 2 /** 3 * @param $scope The Widget wrapper element as a jQuery element 4 * @param $ The jQuery alias 5 */ 6 var WidgetPieChartHandler = function( $scope, $ ) { 7 elementorFrontend.waypoint($scope.find('.ct-piechart .percentage'), function () { 8 var track_color = $(this).data('track-color'); 9 var bar_color = $(this).data('bar-color'); 10 var line_width = $(this).data('line-width'); 11 var chart_size = $(this).data('size'); 12 13 var options = { 14 animate: 2000, 15 lineWidth: line_width, 16 barColor: bar_color, 17 trackColor: track_color, 18 scaleColor: false, 19 lineCap: 'round', 20 size: chart_size 21 }; 22 $(this).easyPieChart(options); 23 }, { 24 offset: '95%', 25 triggerOnce: true 26 }); 27 }; 28 29 // Make sure you run this code under Elementor. 30 $( window ).on( 'elementor/frontend/init', function() { 31 elementorFrontend.hooks.addAction( 'frontend/element_ready/ct_piecharts.default', WidgetPieChartHandler ); 32 elementorFrontend.hooks.addAction( 'frontend/element_ready/ct_counter.default', WidgetPieChartHandler ); 33 } ); 34} )( 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.