Fórum

Include JS in theme contributors

Ionut Stanescu, modificado 6 Anos atrás.

Include JS in theme contributors

New Member Postagens: 3 Data de Entrada: 17/04/16 Postagens Recentes
Hi everybody,

I'm trying to create a new theme contributor for product-navigation-product-menu.
I was able to modify the css and the updates were visible in the site, but I do not know how and were to add JS files.
I've tried adding a new JS folder under Resources/META-INF/resources/ folder and there I've added an main.js file
AUI().ready(
{
window.alert("Testing");
};
);
but it's not being executed.

Can someone help me in my quest ?

Thanks
thumbnail
Luiz Pereira, modificado 6 Anos atrás.

RE: Include JS in theme contributors

New Member Mensagem: 1 Data de Entrada: 02/03/16 Postagens Recentes
o dont know about the folder path, but...

try:


AUI().ready(function() {
    window.alert("Testing");
});
thumbnail
Chema Balsas, modificado 6 Anos atrás.

RE: Include JS in theme contributors

Regular Member Postagens: 127 Data de Entrada: 25/02/13 Postagens Recentes
Hey Ionut, as Luiz kindly pointed out, your code wasn't correct.

Theme contributors will append all contained js files in <script> tags and run them accordingly.