Created
October 17, 2016 08:17
-
-
Save donnywals/0bf73af34733367af53482775f1ed8a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| // Elke click handler krijgt een event object als argument binnen. | |
| // Dit event object bevat informatie of de click die gebeurt is, zoals | |
| // bijvoorbeeld het elemenet waarop geklikt is. Dit object is bereikbaar | |
| // via de target property van het event object. Als je die in een jquery | |
| // dollar ding wrapt kun je dus ook de hide functie aanroepen. Daarmee hide | |
| // je dus het plaatje waarop geklikt is in plaats van alleen de eerste :) | |
| $("img").click(function(event) { | |
| $(event.target).hide(); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment