How to process element excluding the first and last one. I have a table with a given number of rows. I want to trigger the rows on a click event but should not process the click if first or last row is clicked. How can I implement this?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
How about:
$('tr:not(:first, :last)').click(function() {
// ...
})
?