Function is not called on mobile device

Asked

Viewed 24 times

1

Person is as follows... I am on a project of a website, where the same is responsive. On this site, there is an area dedicated to showing news, where there is a button (tag to) which opens a new tab with the news. The problem occurs there, at the time I invoke Function by the onclick attribute! For desktop format, the link works normally, however, when I’m with the mobile responsive site, Function isn’t even called! I would like opinions...

I use the Materializecss framework for responsiveness.

Code

<a class="btn waves-effect" onclick="openLink('https://g1.globo.com/carros/noticia/fabricantes-de-veiculos-devem-retomar-producao-na-proxima-segunda-vendas-de-maio-devem-despencar.ghtml');">Saiba mais</a>

function openLink(link){
    window.open(link, '_system');
}

NOTE: I am creating the tag and assigning values by JS.

  • Even on the desktop when vc decreases the screen it does not call the function or just on mobile?

  • This !!! It’s just the site entering responsibly, Function is not called. Could it be the framework ? A Carousel is being used for the news...

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.