我正在尝试让灯箱在图像地图上工作。但是当我执行此操作时,我收到一条错误,指出无法找到click事件。我错过了什么?
<head>
<script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script>
<script>
$(document).ready(function() {
$('area.optSelectMe').click(function() {
$("#span1").click();
});
});
</script>
<script src="Scripts/prototype.js" type="text/javascript"></script>
<script src="Scripts/scriptaculous.js" type="text/javascript"></script>
<script src="Scripts/lightbox.js" type="text/javascript"></script>
</head>
<body>
<div>
<map id="EnrollmentPageMap" name="EnrollmentPageMap" style="z-index: 10;">
<area alt="Enroll Now" shape="rect" coords="0, 639, 363, 749" href="Enrollment.aspx" />
<area alt="View 360" id="View360" class="optSelectMe" shape="rect" coords="806, 569, 1006, 633" href="#" />
</map>
<img src="images/EnrollmentPageBackground.jpg" usemap="#EnrollmentPageMap" alt="" />
<a href="images/View360/MG_8687.JPG" rel="lightbox[View360]"><span id="span1"></span></a>
<a href="images/View360/MG_8688.JPG" rel="lightbox[View360]"><span id="span2"></span></a>
<a href="images/View360/MG_8699.JPG" rel="lightbox[View360]"><span id="span3"></span></a>
<a href="images/View360/MG_8689.JPG" rel="lightbox[View360]"><span id="span4"></span></a>
<a href="images/View360/MG_8690.JPG" rel="lightbox[View360]"><span id="span5"></span></a>
<a href="images/View360/MG_8691.JPG" rel="lightbox[View360]"><span id="span6"></span></a>
<a href="images/View360/MG_8692.JPG" rel="lightbox[View360]"><span id="span7"></span></a>
<a href="images/View360/MG_8693.JPG" rel="lightbox[View360]"><span id="span8"></span></a>
<a href="images/View360/MG_8694.JPG" rel="lightbox[View360]"><span id="span9"></span></a>
<a href="images/View360/MG_8695.JPG" rel="lightbox[View360]"><span id="span10"></span></a>
<a href="images/View360/MG_8696.JPG" rel="lightbox[View360]"><span id="span11"></span></a>
<a href="images/View360/MG_8697.JPG" rel="lightbox[View360]"><span id="span12"></span></a>
<a href="images/View360/MG_8698.JPG" rel="lightbox[View360]"><span id="span13"></span></a>
</div>
</body>