Skip to content

Instantly share code, notes, and snippets.

@Bajena
Last active Jun 13, 2017
Embed
What would you like to do?
Prosty przykład użycia event listenerów
<html>
<head>
<meta charset="utf-8">
<title>Event handlers demo</title>
<script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
</head>
<body>
<div class="wrapper" style="width:300px;height:300px;background:red;">
<button>Click me</button>
</div>
<script>
(function() {
$('.wrapper').click(function wrapperHandler() {
console.log('wrapper');
});
$('button').click(function buttonHandler() {
console.log('button');
});
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment