-2
jQuery(document).ready(function() {
jQuery(".page-contents div").hide();
// Show chosen div, and hide all others
jQuery("a").click(function (e) {
//e.preventDefault();
jQuery("#" + jQuery(this).attr("class")).show().siblings('div').hide();
});
});
http://jsfiddle.net/fXE9p/如何修改此jQuery以将活动类添加到所选链接?
有人能解释我如何去这样它增加了一个“积极”级到选定的链接修改这个代码,以及它是如何工作的?敬请谢谢你在前进