我有以下HTML:的jQuery的div的onclick點擊DIV中一個href
<table class="products">
<tr>
<td>Product description probably goes here</td>
<td><a href="#">more information</a></td>
</tr>
</table>
,使其成爲支持JavaScript的瀏覽器性感一點我已經添加了這個jQuery(1.3.2):
$(document).ready(function(){
$('table.products tr').click(function(){
$(this).find('a').click();
return false;
});
});
但我認爲它進入了一個無限循環或什麼。 Safari展示了這一點:
RangeError: Maximum call stack size exceeded. jquery.min.js:12
任何人都可以提供解決方法或更好的方法?
downvote的原因是什麼? – Shawn 2009-10-23 19:48:40
嘿幾乎讓你到5K;) – Mattis 2011-08-20 18:14:08