Michael Trabjerg

Hide module in mobile browser

8 posts in this topic

Hi

Please add this javascript to your js file

jQuery(document).ready(function(){

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {

jQuery('#floater_content_right, #floater_content_left').hide();

}

});

Share this post


Link to post
Share on other sites

Hi

You can put it to any javascript file of your template.

Or add it directly your header with a script tag like this

<script type="text/javascript">

jQuery(document).ready(function(){

if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {

jQuery('#floater_content_right, #floater_content_left').hide();

}

});

</script>

As long as jQuery library is loaded before.

Share this post


Link to post
Share on other sites

I placed the code on numerous JS files but the they are still visible on the mobile browser. Why can't this functionality be put on the settings tab to switch off on mobile browser. In the meantime, is there in other way to hide them from the mobile browser?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now