test

Written by Leif Stenfeldt. Posted in Tips

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
  $(document).ready(function(){
    $(".containerdiv").click(function(){
      $(this).find(".inch").slideToggle("slow");
    });
  });
</script>
</head>

<body>
  <h2>This is a heading</h2>
  <div class="containerdiv">klik her
    <div class="inch">dette er teksten.</div>
  </div>
  <br><br>
  <div class="containerdiv">klik her2
    <div class="inch">dette er teksten2.</div>
  </div>
</body>

 

Test

14 views

Leave a comment