Skip to main content
added 34 characters in body
Source Link
Krishna Mohan
  • 6.3k
  • 9
  • 30
  • 55

I use this code to hide blocks in mobile view and it works perfectly. past this code in your page.tpl.php file and add ID hidden to the block or in my case adsenese Ad unit.

`

jQuery(document).ready(function($){

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { $("#hide").css("display", "none"); } }); `

<script type="text/javascript">

jQuery(document).ready(function($){

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
 $("#hide").css("display", "none");
 }
});
</script>

I use this code to hide blocks in mobile view and it works perfectly. past this code in your page.tpl.php file and add ID hidden to the block or in my case adsenese Ad unit.

`

jQuery(document).ready(function($){

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { $("#hide").css("display", "none"); } }); `

I use this code to hide blocks in mobile view and it works perfectly. past this code in your page.tpl.php file and add ID hidden to the block or in my case adsenese Ad unit.

<script type="text/javascript">

jQuery(document).ready(function($){

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
 $("#hide").css("display", "none");
 }
});
</script>
Source Link
Fawad
  • 51
  • 4

I use this code to hide blocks in mobile view and it works perfectly. past this code in your page.tpl.php file and add ID hidden to the block or in my case adsenese Ad unit.

`

jQuery(document).ready(function($){

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { $("#hide").css("display", "none"); } }); `