Jquery hide and confirm window not working in Chrome - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:hide

Description

Jquery hide and confirm window not working in Chrome

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
  </script> 
 </head> //  w  w  w.  j  a va2  s.  c  om
 <body> 
  <a id="aa" href="javascript:hideit();">try it</a> 
  <script type="text/javascript">
           function hideit() {
               if (confirm('hide?')) {
                   $('#aa').hide();
               }else{
                    $('#aa').show();
               }
           }
     
      </script>  
 </body>
</html>

Related Tutorials