I have this code which hides certain HTML code when using different browser. Here is the code:
<script type="text/javascript">
$(document).ready(function () {
var is_chrome = !!window.chrome && !is_opera;
var is_explorer= typeof document !== 'undefined' && !!document.documentMode && !isEdge;
var is_firefox = typeof window.InstallTrigger !== 'undefined';
var is_safari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
var is_opera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
if(is_chrome || is_firefox)
{
$('#otherbrowser').hide();
}
else
{
$('#logOut').hide();
}
});
</script>
It works when i use safari and Google Chrome but when i tried using Internet Explorer it does not hide the #otherbrowser
. What seems to be the problem? Any help would be appreciated. Thanks.