Javascript Events when adding or editing Widgets/Blocks (apostrophe-block)

12 visualizações
Pular para a primeira mensagem não lida

Fotis Paraskevopoulos

não lida,
3 de mar. de 2016, 11:53:3803/03/2016
para apostr...@googlegroups.com
Hello Tom,

What would be the right way to run some javascript code, when a widget/ block has been added.

At the moment I am adding a custom apostrophe-block, which contains the logic in a <script> tag. However it seem the <script> tags are being stripped from the markup.

How can I trigger some javascript  as soon as it is added to the document.

Best,
FP

Matthew Crider

não lida,
17 de mar. de 2016, 10:09:5317/03/2016
para apostrophenow
Hey Fotis, have you seen https://groups.google.com/forum/#!searchin/apostrophenow/javascript$20event|sort:date/apostrophenow/JTf-cZ1M6I8/SKvi1FiVApwJ ?  I just discovered the 'Players' stuff, its pretty cool -- just make sure you use the right widget name in place of slideshow (in the example there) and it will be called whenever your widget is updated.

- Matt

Tom Boutell

não lida,
17 de mar. de 2016, 10:10:4117/03/2016
para apostr...@googlegroups.com
Thanks Matt, I missed this question originally, but it's good to have other people answering questions (:

Players are the way to go. They do the right thing whether it's the initial page load or a later addition of the widget.

--
You received this message because you are subscribed to the Google Groups "apostrophenow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apostropheno...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


THOMAS BOUTELL, DEV & OPS
P'UNK AVENUE | (215) 755-1330  |  punkave.com
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem