1(function($) { 2 3 var typedJs = {}; 4 5 // Main object init 6 typedJs.init = function( scope ){ 7 this.initElement(); 8 this.refreshEvents(); 9 }; 10 11 // Will hook into Kallyas PB to refresh the element 12 typedJs.refreshEvents = function(){ 13 var that = this; 14 $(document).on('ZnNewContent', function(e){ 15 that.initElement( e.content ); 16 }); 17 }; 18 19 // Will initialise the animated text element 20 typedJs.initElement = function( scope ){ 21 var $el = scope ? scope.find('.zn-dynamic-animated-typed') : $(".zn-dynamic-animated-typed"); 22 23 if( $el.length === 0 ){ 24 return; 25 } 26 27 $el.each(function(){ 28 var $this = $(this), 29 $stringContainer = $this.prev('.zn_animated_dynamic_texts'), 30 config =$stringContainer.data('config'), 31 defaults = { 32 stringsElement: $stringContainer 33 }, 34 config = $.extend(defaults, config); 35 36 37 //if($hideCursorTime.data('hidecursor')) 38 //$stringContainer = $this.prev('.zn_animated_dynamic_texts'), 39 40 var timeCursor = $stringContainer.data('hidecursor'); 41 if(timeCursor){ 42 setTimeout(function(){ 43 $this.next('.typed-cursor').hide(); 44 }, timeCursor); 45 } 46 47 //init the animated text 48 $this.typed(config); 49 50 }); 51 }; 52 53 typedJs.init(); 54 55})(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.