手风琴-向每个导航项目添加箭头? [英] Accordion - add arrow to each nav item?

查看:90
本文介绍了手风琴-向每个导航项目添加箭头?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我们做什么

我需要为每个导航项添加上下箭头,如此图片所示.我在哪里以及如何将两种状态(无效箭头和有效箭头)编码到jQuery中.我以为我需要将此代码编码到jQuery中?

I need to add up and down arrows to each nav item as seen in this pic. Where and how do I code in the two states(inactive arrow & active arrow) into the jQuery. Im thinking I need to code this into the jQuery?

推荐答案

您可以使用一些简单的CSS类来完成此操作,因为a在打开时具有不同的类:

You can do this with some simple CSS classes, since the a's have different classes when they are opened:

toggler toggler-closedtoggler toggler-opened

.toggler.toggler-opened {
    /* a background image on the right side with arrow down? */
}

.toggler.toggler-closed {
    /* a background image on the right side with arrow to the right? */
}

这篇关于手风琴-向每个导航项目添加箭头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆