Created
February 17, 2015 09:05
-
-
Save andidp/6af0c6aa8e1b6b835630 to your computer and use it in GitHub Desktop.
jquery click
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
<html> | |
<head> | |
<title>title</title> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$('#sel div a').click(function(){ | |
console.log( this.rel ); | |
console.log( this.href ); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="sel"> | |
<div><a href="#{id: 1}" rel="1" id="c1">test</a></div> | |
<div><a href="#{id: 2}" rel="2" id="c2">tost</a></div> | |
</div> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment