使用 jQuery 选项卡作为站点导航器?
我想使用 jQuery 选项卡作为导航器,即选项卡实际上不应包含任何内容,但相反,当用户单击所有其他选项卡然后单击当前选项卡时,它应该导航到另一个页面。
另外,当到达该页面时,我希望第二个选项卡在加载时应该可见。
示例:
Page1.aspx:
Page1 | Page2 | Page3 | Page4
Page1 content| blank | blank | blank
第 2、3 和 4 页的选项卡标题应该只是指向相应页面的链接。
Page2.aspx:
Page1 | Page2 | Page3 | Page4
blank |Page2 content| blank | blank
第 1、3 和 4 页的选项卡标题应该只是指向相应页面的链接。
等等。
我想将选项卡寻呼机放置在母版页中,然后在每个页面各自的选项卡中填写内容,并将其他选项卡留空。
I want to use jQuery tabs as a navigator, i.e. the tabs shouldn't actually contain anything but instead, when user clicks all the other tabs then the current, it should navigate to another page.
Also, when arriving to that page, I want that second tab shoould be visible onload.
Example:
Page1.aspx:
Page1 | Page2 | Page3 | Page4
Page1 content| blank | blank | blank
The tab titles for page 2, 3 and 4 should be just links to the appropriate page.
Page2.aspx:
Page1 | Page2 | Page3 | Page4
blank |Page2 content| blank | blank
The tab titles for page 1, 3 and 4 should be just links to the appropriate page.
And so on.
I want to place the tabs pager in a master page, then fill-in the content in each page its respective tab and leave the others blank.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你确定不想要这样的东西吗:
我不明白你使用 jQuery 的目的是什么?...
Are you sure you don't want something like this:
I don't see what you're using jQuery for?...
jQuery 支持通过 ajax 加载内容,只需将 A 链接指向 url 而不是 div id 即可。 但据我所知,没有办法真正让它转到另一个页面。 您可能最好只使用选项卡的现有 css 定义,而不使用 ui 选项卡插件
UPDATE。 这是选项卡的基本 html/css 模型。 您将需要下载 jquery ui 的副本,以便获得 CSS 和图像,但这是制作选项卡的骨架。
jQuery supports loading of content via ajax, simply by pointing the A link to a url instead of a div id. But as far as I know there is no way to actually make it go to another page. You're probably better off just using the existing css definitions for the tabs and not using the ui tabs plugin
UPDATE. This is the basic html/css mockup for the tabs. You will need to download a copy of jquery ui so you get the css and images, but this is the skeleton which makes the tabs.
受到
Mark
的回答的启发,经过一些尝试和错误并深入研究 jQuery UI CSS 文件,我得到了以下内容,可以使用 jQuery UI 自己的样式进行工作。然后在另一个CSS文件中添加这个
Inspired by
Mark
's answer, and after some trial and error and digging through the jQuery UI CSS file, I got the following to work using jQuery UI's own styles.and in another CSS file add this