Project

General

Profile

Actions

{ia_add_js}

To include js code into template's code {ia_add_js} function is used.

{ia_add_js}
    $('.add-js-example').html('ia_add_js smarty function example');
{/ia_add_js}

The code is input between opening and closing tags.
If you use braces ('{' and '}') within the js code you should wrap the code inside the braces with whitespaces, newlines, or tabs:

Example:

{ia_add_js}
    $('.add-js-example').click(function() {
        $(this)
            .show()
            .html('ia_add_js smarty function exmaple.');
    });
{/ia_add_js}

Updated by Anonymous over 6 years ago · 2 revisions