javascript dans un article wordpress

Afin de pouvoir mettre avoir un appel .js sur un post wordpress, nous avons la solution jquery (avec la fonction jQuery.getScript).

Exemple :

Code :

<div class=”TA_ssnarrowcollectreview” id=”TA_ssnarrowcollectreview302″>
<ul class=”TA_links nM4yFE2xX” id=”iNKd7MBTG”>
<li class=”zKAkWSr” id=”sSKH8c9Lro”><a href=”http://www.tripadvisor.com.br/” target=”_blank”><img alt=”TripAdvisor” src=”https://www.tripadvisor.com.br/img/cdsi/img2/branding/150_logo-16124-2.png” /></a></li>
</ul>
</div>
<script type=”text/javascript”>// <![CDATA[
jQuery.getScript(“http://www.tripadvisor.com/WidgetEmbed-ssnarrowcollectreview?amp;uniq=302&amp;lang=pt&amp;border=true&amp;locationId=2732948”, function(data, status, jqxhr) {});
// ]]></script>

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply