Last active
May 17, 2016 17:40
-
-
Save TheRealJAG/8f8e61d8ad38083832ee86f705788830 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
<script src="https://code.jquery.com/jquery-1.11.0.js"></script> | |
<script type="text/javascript"> | |
<!-- | |
$(document).ready(function() { | |
//To gain acccess to DOM, place the function inside $(document).ready | |
registerClickHandler(); | |
function registerClickHandler() { | |
$('#clickme').click(function(event) { | |
var data = $(this).html(); | |
setTimeout(function() { | |
alert(data); | |
}, 200,data); | |
}); | |
} | |
}); | |
--> | |
</script> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test page</title> | |
</head> | |
<body> | |
<div id="clickme"><strong>test</strong></a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment