Detect client browser support JavaScript in WordPress theme
Open “functions.php” and add below code. In the first function we add “no-js” class to body class. In the second function if browser support the JavaScript, the code will run and delete “no-js” class. If body has “no-js” class, then browser doesn’t support JavaScript or it is disabled.