html打开关闭菜单,如何让一个A href链接在菜单栏中点击时,它打开一个关闭的手风琴体?-html格式...

$(".expand").on("click", function () {

$(".right-arrow").text("+");

$(".detail:visible").slideUp();

if(!$(this).next().is(":visible")){

$(this).next().slideDown(200);

$(this).find(".right-arrow").text("-");

}

});

$('.accord').each(function(index) {

$(this).click(function(event) {

event.preventDefault();

$(".expand").eq(index).trigger('click');

});

});

/*Tips & Tricks Page*/

*,

*:before,

*:after {

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

}

#trickslist {

font-family: 'Open Sans', sans-serif;

width: 80%;

margin: 0 auto;

display: table;

}

#trickslist ul {

padding: 0;

margin: 20px 0;

color: #555;

}

#trickslist ul > li {

list-style: none;

border-top: 1px solid #ddd;

display: block;

padding: 15px;

overflow: hidden;

text-align: center;

}

#trickslist ul:last-child {

border-bottom: 1px solid #ddd;

}

#trickslist ul > li:hover {

background: #efefef;

}

.expand {

display: block;

text-decoration: none;

color: #555;

cursor: pointer;

}

.tipstricks {

padding: 5px;

margin: 0;

font-size: 17px;

font-weight: 400;

}

span {

font-size: 12.5px;

}

#left,#right{

display: table;

}

.detail a {

text-decoration: none;

color: #C0392B;

border: 1px solid #C0392B;

padding: 6px 10px 5px;

font-size: 14px;

}

.detail {

margin: 10px 0 10px 0px;

display: none;

line-height: 22px;

height: 150px;

}

.detail span{

margin: 0;

}

.right-arrow {

padding-top: 0px;

margin-top: 0px;

margin-left: 20px;

width: 10px;

height: 100%;

float: right;

font-weight: bold;

font-size: 20px;

}

Open 1st accordion

Open 2nd accordion

  • +

    Exploring your Motivations to Quit Tobacco

  • +

    What to expect over time.

  • +

    Getting Ready: Strategies to conquer urges & set a quit date

  • +

    Quitting tobacco with medications

  • +

    Dealing with depression or stress

  • +

    Avoiding weight gain or alcohol

  • +

    Making your plan stick: relapse prevention

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值