Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 8th Jan 2015, 06:39 AM   #1
Warrior Member
 
Join Date: 2013
Posts: 21
Thanks: 5
Thanked 2 Times in 2 Posts
Default
How to stop code execution on mobile?
Share on: 
fb share twitter share gplus share more share

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.
kabarovsky is offline  
Unread 8th Jan 2015, 11:49 AM   #2
Active Warrior
Registered Member
 
Join Date: 2013
Posts: 58
Thanks: 4
Thanked 16 Times in 12 Posts
Default
Re: How to stop code execution on mobile?
Share on: 
fb share twitter share gplus share more share

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>
geekSoftware is offline  
Closed Thread


Bookmarks

Tags
code, execution, mobile, stop


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:32 PM.