有人可以告诉我这里要改变什么吗?我正在尝试使用jQuery和Pug生成导航栏。类似的代码在HTML中实现时有效,但我的其余代码是用Pug编写的,我似乎无法进行必要的调整。谢谢!
doctype html
html
head
body
.header
.main-content
a(href="#testtag" class="test2") The button bar should appear here
jQuery(function($){
place_buttons;
})(jQuery);
function place_buttons() {
$('#a.test').on('click', function() {
var navBar =
'<a href="#dataList" class="fp"> « </a>' +
'<a href="#dataList" class="pp"> Previous page </a>' +
'<a href="#dataList" class="np"> Next Page </a>' +
'<a href="#dataList" class="lp"> » </a>';
$('#a.test').html(navBar);
})
}
按钮栏应显示在此处