My HTML page dynamically loads specific CSS files based on screen width (for PC, tablets, and phones):
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="all" href="css/style.css" >
<link rel="stylesheet" type="text/css" media="screen and (min-width: 1200px)" href="css/desktop-style.css" >
<link rel="stylesheet" type="text/css" media="screen and (min-width: 769px) and (max-width: 1199px)" href="css/tablet-style.css" >
<link rel="stylesheet" type="text/css" media="screen and (min-width: 100px) and (max-width: 768px)" href="css/phone-style.css" >
I rely heavily on jQuery and need to select functions based on the active CSS. Is there a way in JavaScript or jQuery to determine which CSS is currently active? Or should I use jQuery to determine the browser width and then execute functions based on the width value? Thank you.