静态网站的自动下一个和上一个导航?
我有一个静态网站,其中包含一系列页面,我想向其中添加“下一页”和“上一页”链接。将每个页面的按钮链接到下一页和上一页并不是一个大麻烦,但更新和重新排序可能会很痛苦。
有人知道使用 jquery 或 mootools 的任何方便的解决方案吗?
谢谢。
I have a static site with a series of pages that I'd like to add "next page" and "previous Page" links to. Linking the buttons to the next and previous pages from each page is not a big hassle but can be a pain to update and re order.
Anyone know of any handy solutions using jquery or mootools?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建一个包含页面所有 URL 的数组,然后检查数组中当前页面的 URL,并基于此使用 jquery 创建上一个和下一个按钮。
You could create an array containing all the URLs of the pages, then check the URL of the current page in the array and create the prev and next buttons with jquery based on that.