我的手风琴结构如下:
<div class= "accordion">
<div class = "h3">
<div class = 'id'>
<span class ="emp_data"><b> Full Name: </b> {FULL NAME} </span> |
<span class ="emp_data" ><b>Employee ID: </b> {ID} </span> |
<span class ="emp_data" ><a class= "assign" href = "../assign.php?sup=000000 " >Assign </a></span>
</div>
</div>
<div>
<ul>
<li>ITEM 1</li>
<li>ITEM 2</li>
<li>ITEM 2</li>
</ul>
</div>
</div >
我正在使用以下内容来捕获按钮上的点击但不工作:
$(".accordion a").click(function() {
window.location = $(this).attr('href');
return false;
});
有人可以帮我弄清楚为什么它不起作用吗?