Wednesday, March 1, 2017

Reading js file at desktop without mobile devices in laravel

I'm trying to not showing js file at mobile devices and that code working with me at html file :

if (window.matchMedia("(min-width: 768px)").matches) {
  document.write('<script type="text/javascript" src="website/js/nav.js"><\/script>');
}

But when i'm using that at larvel it doesn't !

How can i pass this code at laravel file ?




via Dina Shaldoum

Advertisement