When I use hide and confirm in html. The hide is not working properly in Chrome only. When the confirmation window is shown, the "aa" element is not hidden. IE and FF is working fine.
Any kind of suggestion is appreciated.
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
</head>
<body>
<a id='aa' href='javascript:hideit();'>try it</a>
<script type='text/javascript'>
function hideit() {
$('#aa').hide();
if (!confirm('hide?')) {
$('#aa').show();
return;
}
$('#aa').show();
}
</script>
</body>
</html>
Please check following code, it works properly in all browsers :
Thanks...