0

Just about to finished the website, I have a little problem when I've got to make adjustments conditionally as it is in term of screen display on tablets,etc. There is the code that the value is written by the javascript, I am not sure how to define styles outside the css. Is it there any code I could write just to make my website is possible that it can be viewed from tablets, etc.

Here is the code:

<script>
        function tmbl2() {
          var bkaTuttp2 = document.getElementById("mnu2");
          var bkaTuttp1 = document.getElementById("mnu1");
          var bkaTuttp3 = document.getElementById("mnu3");  
          if (bkaTuttp2.style.width == '1170px') {    
            bkaTuttp2.style.width = '0';
            bkaTuttp2.style.opacity = 0;
          } else {
            bkaTuttp2.style.width = "1170px";
            bkaTuttp2.style.opacity = 1;
            bkaTuttp1.style.width = '0';
            bkaTuttp1.style.opacity = 0;
            bkaTuttp3.style.width = '0';
            bkaTuttp3.style.opacity = 0;
          }
        }
        </script>
Filburt
  • 17,626
  • 12
  • 64
  • 115
  • 4
    Welcome to StackoverFlow. Please [take the tour](https://stackoverflow.com/tour), [read about how to ask good questions](https://stackoverflow.com/help/how-to-ask) and learn [how to create a Minimal, Complete and Verifiable Example](https://stackoverflow.com/help/mcve). – Gaurang Dave Mar 29 '18 at 06:55
  • Possible duplicate of [How to get same results in different devices?](https://stackoverflow.com/questions/48905635/how-to-get-same-results-in-different-devices) –  Mar 29 '18 at 07:02
  • not at all, I need to know how to write the adjustments code to that width style value of 1170px. – Yudha Swarna Mar 29 '18 at 07:05

0 Answers0