Created
January 15, 2010 00:11
-
-
Save rzhw/277647 to your computer and use it in GitHub Desktop.
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script type="text/javascript" src="jquery-1.4.min.js"></script> | |
<script type="text/javascript" src="jquery.compat-1.3.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('#admin .block.button').click(function() { | |
alert('Hello world!'); | |
}); | |
/* | |
Also applies to $('#admin .button'), $('#admin').filter('.block.button'), $('#admin').filter('.button') | |
*/ | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="admin"> | |
<div class="block button">Click me</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment