jQuery UI 手风琴 1.6

发布于 2024-08-27 11:08:26 字数 941 浏览 3 评论 0原文

我正在使用 jQuery UI Accordion 1.6 (http://docs.jquery.com/UI/Accordion< /a>),我对它进行了一些更改,并使其按照我的需要并希望它工作。它有一些问题,但主要的问题之一是我根本不知道如何让它发挥作用。

该插件按预期工作,它实际上关闭、打开、再次打开、一起关闭等等。但是,我试图在标题文本下方获取“发布者...”信息。另外,我希望作者和 0 条评论部分成为一个单独的链接,问题是它们位于 A 类(打开手风琴)内。也许这甚至不是插件的问题,但我已经用完了选项。

jQuery 在这里调用“A”: 我尝试过将这个 A 切换到 div,但它就中断了。我想,“哦,我必须改变我的 CSS”,但要么我做错了,要么它甚至不是 jQuery 问题,而是 CSS 问题......我就是想不通 rahhh@#$!任何帮助将不胜感激。

这是我正在使用的示例; http://www.notedls.com/demo

$.extend($.ui.accordion, {
defaults: {
    selectedClass: "selected",
    alwaysOpen: true,
    animated: 'slide',
    event: "click",
    header: "a",
    autoheight: true,
    running: 0,
    navigationFilter: function() {
        return this.href.toLowerCase() == location.href.toLowerCase();
    }
},

I'm using the jQuery UI Accordion 1.6 (http://docs.jquery.com/UI/Accordion), I've changed it a bit and made it work as I need and want it to work. There is just a few things off about it, but one of the major ones is something I just simply can't figure out how to make it work.

The plugin is working as intended, it actually closes, opens, opens again, closes all together, etc. However, I'm trying to get the "Posted by..." information right underneath the Headline text. Also, I want the AUTHOR and 0 comments part to be a separate link, the problem is that they are inside the A CLASS (which opens the accordion). Maybe this isn't even a issue with the plugin, but I've run up on options.

The jQuery is calling "A" here:
I've tried switching this A to a div, but it just breaks. I thought, "Oh I have to alter my CSS", but either I'm doing it wrong, or its not even a jQuery issue, but a CSS one...I just can't figure this out rahhh@#$! Any help would be appreciated.

Here is the example I'm working with; http://www.notedls.com/demo

$.extend($.ui.accordion, {
defaults: {
    selectedClass: "selected",
    alwaysOpen: true,
    animated: 'slide',
    event: "click",
    header: "a",
    autoheight: true,
    running: 0,
    navigationFilter: function() {
        return this.href.toLowerCase() == location.href.toLowerCase();
    }
},

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

恬淡成诗 2024-09-03 11:08:26

要在标题下获得发布者的信息,请尝试在noted.css中的第220行左右,更改行高:

ul.ui-accordion-container li a.acc1 {
line-height:1em;
}

作者和评论数实际上是同一行代码,因此您需要添加<>。 br/>或者,理想情况下,如果您想将它们分开,可以使用一些适当的语义标记。

To get the posted by under the title, try around line 220 in noted.css, change the line-height:

ul.ui-accordion-container li a.acc1 {
line-height:1em;
}

The author and the comment count really are the same line of code, so you'll need to add in a < br/ > or, ideally, some proper sementic markup if you want to separate them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文