Standard Javascript

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>

jQuery is included in all Envoke templates. For Javascript embedded engagement builder pages, it is included with the following namespace:

nvkForm.jQuery

Example usage:

nvkForm.jQuery(document).ready(function() {});

This ensures there will be no conflicts with other instances of jQuery included on the parent page.

Adding custom Javascript libraries

Include the <script> tag with the javascript library in the template HTML using the "HTML editor" tab.

Use the Javascript section in the "CSS/JS" tab to load and configure the library. Developer access is required to access this page. 

In the example below, a countdown timer plugin is loaded, and its end date is set configured:

Note that wrapping in the jQuery $(document).ready() function may be required

$(document).ready(function() {
  $('#my-count-down-timer').county({ endDateTime: new Date('2017/02/02 14:00:00') });});
Did this answer your question?