我正在构建基于引导的wordpress主题,在默认的wordpress日历小部件上,样式与引导样式不匹配。
但是,很容易匹配日历小部件中列的宽度。
当小部件被激活时,它被包装在
<table id="wp-calendar">如果我能够以某种方式将类添加到那个特定id的表中,我就会解决样式问题。
所以基本上不是
<table id="wp-calendar">我需要
<table id="wp-calendar" class="table table-responsive table-striped">是否有解决方案将类添加到带有id的特定表中?
一些php函数还是jquery?
发布于 2013-12-22 18:16:44
使用jQuery,
$("#wp-calendar").addClass("table table-responsive table-striped");发布于 2013-12-22 18:16:45
$('#wp-calendar').addClass('table table-responsive table-striped');发布于 2013-12-22 18:16:52
使用jQuery,您可以这样做:
// document ready
$(function(){
$('#wp-calendar').addClass('table table-responsive table-striped');
});https://stackoverflow.com/questions/20732486
复制相似问题