Скриване на елемент за мобилни устройства

Идеята е с javascript да идентифицираме клиента по user agent-а и да скрием id блок от него.

<script>
var mobile = (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
if (mobile) {
$(‘#bu1’).hide();
}

</script>

Posted in:

Logged in as {{omniform_current_user_display_name}}. Edit your profile. Log out? Required fields are marked *

Your email address will not be published. Required fields are marked *

Comments are closed.

You must be logged in to post a comment.