Question and answer is powered by AnsPress.io
How to use media query in javascript. I want to run some script for small screen.How can i do this?
if(window.matchMedia( “(min-width: 500px)” ).matches)
{
Do your script here
}
else{
}