Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Custom JavaScript

$
0
0

Replies: 0

I trying connect custom java script to amp page, i did it by example and nothing not working.

in the head i put :

<script async custom-element=”amp-script” src=”https://cdn.ampproject.org/v0/amp-script-0.1.js”></script&gt;

in body:

<amp-script src=”<?php echo get_template_directory_uri(); ?>/assets/js/modules/script.js”>
<div id=”test”></div>
</amp-script>

java script is simple alert some text.

why it not working ?


Viewing all articles
Browse latest Browse all 59525

Trending Articles