jeudi 9 décembre 2021

run JavaScript function in specific screen [duplicate]

I would to know if there is way in Javascript to run function if specific screen is true

function run() {

if (screenSize < 600)
  alert("mobile");

if (screenSize < 800)
  alert("Tablet");

if (screenSize > 800)
  alert("Desktop");
}



Aucun commentaire:

Enregistrer un commentaire