0
下面的第一个工作,即a:first
检测到第一个链接,但是a:second
没有。如何使用jQuery检测页面上的第二个链接?如何使用jQuery检测页面上的第二个链接?
<script type="text/javascript">
$(document).ready(function() {
$('a:first').click(function() {
alert('you clicked 1st link');
});
$('a:second').click(function() {
alert('you clicked 2nd link');
});
});
</script>
<a href="#">1st Link</a>
<a href="#">2nd Link</a>