javascript - typed.js jQuery trigger not working during typing -


i'm using typed.js type in text contains simple jquery modal trigger.

however i'm finding trigger works once typing has completed. how can make clickable?

(so in example below, works when 'sit amet' has appeared.)

typed

$(".js-typed").typed({    strings: ["lorem ipsum dolor <a class='js-modal-trigger'>open modal</a> sit amet."],        showcursor: false,  }); 

modal

$(document).on('click', '.js-modal-trigger', function(){     $('.js-modal').addclass('active'); }); 

i changed using $('.js-modal-trigger').on('click', function() {. still doesn't appear work, until completed.

i've wrapped modal trigger function , tried using typed.js callback: function() {} , onstringtyped: function() {}. neither seemed work.

how can make link clickable appears in document?

) i'm new typed, , going through github stuff ... ....

i think add 2 strings. first completing after link (forcing typed function complete html processing) start string immediately.

$(".js-typed").typed({  strings: ["lorem ipsum dolor <a class='js-modal-trigger'>",  "open modal</a> sit amet."],      showcursor: false, 

});


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -