这段代码有什么问题我错过了什么吗?:( 我认为问题出在 if 和 else ..
$(function () {
if ($("a#toggle_sidebar").length > 0) {
$('#toggle_sidebar').click(function () {
$('#dw_right').show();
$('#content-container div#container').css('width', '83%');
});
} else {
$('#toggle_sidebar').click(function () {
$('#dw_right').hide();
$('#content-container div#container').css('width', '100%');
});
}
});