Skip to content

Instantly share code, notes, and snippets.

@TheRealJAG
Created April 8, 2016 03:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheRealJAG/3eb34829bbccc467b245e27ce5230b0d to your computer and use it in GitHub Desktop.
Save TheRealJAG/3eb34829bbccc467b245e27ce5230b0d to your computer and use it in GitHub Desktop.
<script src="https://code.jquery.com/jquery-1.11.0.js"></script>
<script type="text/javascript">
<!--
$(document).ready(function() {
registerHandlers();
function registerHandlers() {
$('a').click(function(){
var i = $('a').index(this);
alert(i);
return false;
})
}
});
-->
</script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Test page</title>
</head>
<body>
In my life, I used the following web search engines:<br/>
<a href="//www.yahoo.com">Yahoo!</a><br/>
<a href="//www.altavista.com">AltaVista</a><br/>
<a href="//www.google.com">Google</a><br/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment