| | #1 |
| Warrior Member Join Date: 2013
Posts: 21
Thanks: 5
Thanked 2 Times in 2 Posts
|
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. |
| |
| | #2 |
| Active Warrior Registered Member Join Date: 2013
Posts: 58
Thanks: 4
Thanked 16 Times in 12 Posts
|
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> |
| |
|
| Bookmarks |
| Tags |
| code, execution, mobile, stop |
| |