How to stop code execution on mobile?

by 1 replies
2
Does anybody know how to stop code execution on mobile phones or tablets?

This is our website www.genuinepropertybuyers.co.uk and you will notice spokesperson in the right bottom corner. I can hide that on mobile by using CSS, but is there any way to stop or to avoid execution of that part of code (let's say the whole div) on mobile?

The reason I want to do this is that it is slowing down our website while executing although it's hidden.
#programming #code #execution #mobile #stop
  • I will do it from jQuery by detecting the screen of the user device. For example:

    HTML Code:
    <script type="text/javascript">
         $(document).ready(function() {
              if (screen.width < 854) //use any width you would like to
                   $("#sakrij").remove();  //"sakrij"(Bosnian/Serbian word :D) is ID of spokerperson on your website
         });
    </script>

Next Topics on Trending Feed

  • 2

    Does anybody know how to stop code execution on mobile phones or tablets? This is our website www.genuinepropertybuyers.co.uk and you will notice spokesperson in the right bottom corner. I can hide that on mobile by using CSS, but is there any way to stop or to avoid execution of that part of code (let's say the whole div) on mobile?