Expand my Community achievements bar.

SOLVED

Onclick/Click function in Touch UI by client Lib

Avatar

Level 3

how can use onclick /click function in Touch UI by client Lib in AEM6.1

Inline script is working but want to move the js into clientlibs .

Please let me know if it is working with AEM6.3 too.

Code:

HTL 

<button onclick="closeDialog()">X</button>

JS Client lib

function closeDialog() {

alert();

}

1 Accepted Solution

Avatar

Correct answer by
Level 10

See this article - it will show you how you can use JS script in an HTL component:

Scott's Digital Community: Creating an AEM HTL component that uses JavaScript

Using this approach - you can tie in JS logic into a front end HTL component!

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

See this article - it will show you how you can use JS script in an HTL component:

Scott's Digital Community: Creating an AEM HTL component that uses JavaScript

Using this approach - you can tie in JS logic into a front end HTL component!