html
<div id="selector" class="btn-group">
<button type="button" class="btn active" id="Day">Day</button>
<button type="button" class="btn" id="Week">Week</button>
<button type="button" class="btn" id="Month">Month</button>
<button type="button" class="btn" id="Year">Year</button>
</div>
jquery
$(document).ready(function() {
alert("abcde");
$('div.btn').click(function() {
$(this).addClass('active').siblings().removeClass('active');
alert($(this).attr('id'));
alert("abcdef");
});
});
为啥我的代码点击按钮不能生效呢?而且不能弹出"abcdef",
只能弹出"abcde",谢谢
--
FROM 120.204.251.*