Answers for "css window id"

C++
0

css window id

function adjustStyle(width) {
  width = parseInt(width);
  if (width < 701) {
    $("#size-stylesheet").attr("href", "css/narrow.css");
  } else if (width < 900) {
    $("#size-stylesheet").attr("href", "css/medium.css");
  } else {
     $("#size-stylesheet").attr("href", "css/wide.css"); 
  }
}

$(function() {
  adjustStyle($(this).width());
  $(window).resize(function() {
    adjustStyle($(this).width());
  });
});
Posted by: Guest on July-26-2021
0

css window id

<link rel="stylesheet" media="screen and (min-device-width: 800px)" href="800.css" />
Posted by: Guest on July-26-2021
0

css window id

<link rel="stylesheet" type="text/css" href="main.css" />
<link id="size-stylesheet" rel="stylesheet" type="text/css" href="narrow.css" />
Posted by: Guest on July-26-2021

Browse Popular Code Answers by Language