【发布时间】:2014-11-03 23:43:45
【问题描述】:
<script>
$( "#oth" ).click(function() {
$( "#foli9" ).show( "slow" );
});
$( "#fam" ).click(function() {
$( "#foli9" ).hide( 1000 );
});
</script>
是否可以在我选择 id "#fam" 的地方选择多个 id。比如“#fam、#test、#another”?
所以点击它会应用到多个id?
【问题讨论】:
-
我认为使用 class 而不是 ids 是一种更好的方法,而且您应该在询问这个 qustiong google 之前进行一些研究:
select different ids jqueryfirst resulthttp://api.jquery.com/multiple-selector/
标签: jquery tags click css-selectors