Difference between revisions of "Team:KU Leuven/Research/Methods"

Line 7: Line 7:
  
 
<html>
 
<html>
 
 
<head>
 
<head>
 
 
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
 
<script>
 
<script>
 
$(document).ready(function(){
 
$(document).ready(function(){
     $("button").click(function(){
+
     $("#hide").click(function(){
         $("p").toggle();
+
         $("p").hide();
 +
    });
 +
    $("#show").click(function(){
 +
        $("p").show();
 
     });
 
     });
 
});
 
});
 
</script>
 
</script>
 
</head>
 
</head>
 +
<body>
  
 
 
<body>
 
  
 
<div class="summaryheader">
 
<div class="summaryheader">
Line 35: Line 33:
  
  
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
+
<p>If you click on the "Hide" button, I will disappear.</p>
<script>
+
$(document).ready(function(){
+
    $("#show").click(function(){
+
        $("p").show();
+
    });
+
});
+
</script>
+
</head>
+
<body>
+
  
 +
<button id="hide">Hide</button>
 
<button id="show">Show</button>
 
<button id="show">Show</button>
 
<p>If you click on the "Hide" button, I will disappear.</p>
 
 
  
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 13:21, 1 September 2015


Methods

If you click on the "Hide" button, I will disappear.